Home RAP

Expressions evaluation orders and behavior

edited March 2010 in RAP
I didn't found in documentation (learnRAP.pdf) how the expressions are
evaluated in RAP code.B y logic I suppose that they follows delphi
compiler default evaluation order from left to right.

My question is: are boolean expression evaluation short circuited?

For example:

if (Specimen = '051') and ((DeviceCode = 'Elecsys') or (DeviceCode =
'COBAS') or (DeviceCode = 'Edit')) then BEGIN ... END;

In runtime, if Specimen is not equal '051', the statements go to next
line or the compiler continue the evaluation of the ORs?

Another question: which compiler does RB uses to compile rap code? An
embedded pascal compiler ? Is it available or it's proprietary? I don't
yet studied sources, however I saw that some Jedi components are used.

I'm using D7 with RB 9.03 ent. ed.

Thank you

--
Morde

Comments

  • edited March 2010
    Hi Morde,

    Boolean expressions in RAP should function exactly as they would in Delphi.


    if Specimen is not '051', the entire condition is False and will not be
    executed. (Same as Delphi).

    RAP is a stand-alone Pascal compiler developed completely by Digital
    Metaphors. The JEDI components used in RB 9.03 are only for the report
    inspector and the design tabs. For later versions of ReportBuilder we use
    some SynEdit components for code editing however all code compilation and
    execution is still handled by RAP itself.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2010
    Nico Cizik (Digital Metaphors) ha usato la sua tastiera per scrivere :

    Hi Nico, thankyou for all clarifications.
    Bye

    --
    Morde
This discussion has been closed.