.
contact contact


Syntax changes

 
.
  Eloquence B.08.20 introduces support for longer identifier names, fixes some limitations in the syntax parser and adds new keywords.

Enhancements

Longer identifier names

Eloquence B.08.20 introduces support for identifier names up to 26 characters.
Long_variable_names = 1
Variable names, program labels, subroutine and function names may use up to 26 characters. Previous Eloquence versions were limited to 15 characters.

Please note: Using identifier names longer than 15 characters will make a program incompatible with previous Eloquence versions.

Support member variables in IF .. THEN implied LET

The following syntax was not accepted by previous Eloquence versions due to a limitation in the syntax parser.
IF .. THEN Obj.Member=1

Support STRUCT assignment in IF .. THEN implied LET

The following syntax was not accepted by previous Eloquence versions due to a limitation in the syntax parser.
IF .. THEN STRUCT A=B

Support member variables with MAT statement

The MAT statement was enhanced to allow support member variables. For example:
MAT Obj.Member=ZER
MAT Obj.Member=(1)
MAT Obj.A=Obj.B+(4711)
Please note: Using a member variable with MAT will make the program incompatible with previous Eloquence versions.

Support member variables with SUM, ROW and COL array functions

The NUM, ROW and COL functions where enhanced to support member variables. The following syntax was not accepted by previous Eloquence versions due to a limitation in the syntax parser.
PRINT SUM(V.R)
Please find below a more detailed example with MAT statements and array functions:
  TYPE T
     REAL R(1:2,1:2)
     DIM S$(1:2,1:2)
  END TYPE
  DIM V:T
  REAL R(1:2,1:2)
  DIM S$(1:2,1:2)
! 
  IF BACKGROUND THEN PRINT ALL IS STDERR
  TRACE ALL VARIABLES 
  MAT R=(1)
  MAT S$=("1")
  MAT V.R=R
  MAT V.S$=S$
  MAT R=V.R
  MAT S$=V.S$
! 
  PRINT SUM(R);SUM(V.R)
  PRINT ROW(R);ROW(V.R)
  PRINT COL(R);COL(V.R)
!     
  MAT READ R,V.R
  MAT PRINT R;V.R;
  PRINT 
  DATA 1,2,3,4
  DATA 1,2,3,4
  STOP

Support member variables with REDIM statement

The REDIM statement was enhanced to allow support member variables. For example:
REDIM Obj.Member(1:3)
Please note: Using a member variable with REDIM will make the program incompatible with previous Eloquence versions.

Improved SPACE DEPENDENT mode

The SPACE DEPENDENT mode (in the text based development environment) was enhanced to improve handling of conflicting syntax. In SPACE DEPENDENT mode parsing is first performed in SPACE INDEPENDENT mode and is then re-tried in SPACE DEPENDENT mode. As a consequence, conflicting syntax is accepted by using the correct case (as in SPACE INDEPENDENT mode).

Support inserting program segments

The text based development environment in previous Eloquence versions did not allow inserting a new program segment when editing a program. A new program segment could only be added at the end of the program. Eloquence B.08.20 allows to insert a new program segment after the last line of the previous segment.


New Keywords

Eloquence B.08.20 introduces new keywords. Please find a short overview below. A detailed description is available in the documentation of the related functionality.

PATH / PATH$

The PATH statement may be used to assign a new program file PATH. An empty PATH disables the use of program PATH. The PATH$ function returns the currently defined program PATH.

The program PATH affects the LOAD and LOAD SUB statements.

For example:

PATH "/opt/example:"&PATH$
This example specifies to search the directory /opt/example first when loading program files or subprograms.

ON UNDEFINED CALL / OFF UNDEFINED

The ON UNDEFINED CALL statement may be used to specify a subroutine to be called when an undefined function or subroutine is called. This would otherwise result in a runtime ERROR 7 ("Undefined subroutine or function"). The specified procedure is called with the name of the missing subroutine as an argument. After returning from the procedure the failed SUB or FN call is retried (once).
The OFF UNDEFINED statement disables a previous ON UNDEFINED CALL statement.

For example:

ON UNDEFINED CALL Handler
CALL Undefined_procedure
OFF UNDEFINED
...
SUB Handler(N$)
PRINT "Handler:"&N$
The ON UNDEFINED CALL / OFF UNDEFINED statement may be used to implement on demand loading of code in an application rather than using the builtin functionality.

CLSPATH and CLSPATH$

Same as PATH and PATH$ but used for on demand loading of classes and methods.

LOAD CLASS and DEL CLASS

The LOAD CLASS statement may be used used to explictly load a class definition from an external program file.
LOAD CLASS "Customers"
If defined the CLSPATH is used to load a class file unless a location is specified. It is recommended to use on demand loading of classes instead of LOAD CLASS.

The DEL CLASS statement may be used to delete a class definition and all its methods from memory. This is expected to be useful only in rare cases.

LIST SUB/FN [TO END]

The LIST SUB and LIST FN statements may be used to list the specified subroutine, function or class method. The TO END clause may be specified to list all program code from this point on.
LIST FNDate$
LIST SUB Example TO END
LIST SUB Class:Method

DEL SUB/FN class:method

The DEL SUB and DEL FN syntax was enhanced to allow specifying class methods.
DEL SUB Class:Method
DEL SUB Class:Method TO END
It is recommended to use on demand loading of classes and methods.

SETENV

The SETENV statement allows to set, change or undefine environment variables from an application.
SETENV "Name","Value"
SETENV "Name"
GETENV$("Name")
Environment variable names are case sensitive and limited to a max. of 255 characters. When a value argument is present, the environment variable is added or changed to the specified value. When a value a argument is not present the environment variable is deleted.

Please note: It is currently undefined behavior (platform specific) if any changed environment variables are visible to sub processes (eg. executed with COMMAND).


 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  2012-08-16  
  Copyright © 2012 Marxmeier Software AG