Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Each LANSA Open function is described using this format, based on the structure of a 'C' function line:

Returns

LceFunction

(param-type

 parameter1,



 param-type

parameter2 )

...

Parameters

Param-type indicates the type of value for the parameter, while parameter1 and parameter2 represent the actual variable you will declare and use in your application.

Valid param-types include:

...

strNumericString

To represent a character string containing numerics.

strFileName

To represent a character string containing a file name.

isession

To represent an integer variable storing the session identifier.

FOK

To represent a boolean variable (TRUE/FALSE).

...

The actual length of a parameter is indicated by the supplied field name as used in the LCOE.H header file, supplied for use with 'C' programs.

Return Values

Represented by 'Returns' in the function format, this is the value that the function returns when it is called.
Valid values include:

...

  
When a void or no value is returned, you might use the function in the following manner:

No value is returned

 LceFunction
LceFunction(parameter1,
 parameter2)
 

...

 parameter2)

or

 CALL LceFunction
CALL LceFunction(parameter1, parameter2)

 

...

BOOL

A boolean value is returned.

TRUE is 1

FALSE is 0. False normally results in an error code. A list of the error codes is in Appendix A of this guide.

...

When a boolean value is returned, you might use the function in the following manner:

 BOOL       fOK;
fOK = LceFunction(parameter1, parameter2);
if (fOK)

};
 

 |
  
or
If LceFunction(parameter1, parameter2)

 IF LceFunction(parameter1, parameter2) 
  / comment /
ELSE
  / comment /
ENDIF
 

 |
  
or
in Visual Basic

 If LceFunction(parameter1, parameter2) = LceTrue then    ' comment 
Else
  'comment 
End If
 
'LceTrue is a constant declared with the value 1, don't confuse  it with 
'VB True = -1
 

 |
 

int

An integer number is returned.

Long

A long integer is returned.

  
When an integer or long integer is returned, you might use the function in the following manner:

 int        iVal;
iVal = LceFunction(parameter1, parameter2)
 

 |
  
Notes
This section provides important notes regarding the use of the function.
 

...