11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CALCULATE<br />

Syntax<br />

CALCULATE(dictionary.item)<br />

{dictionary.item}<br />

Description<br />

The <strong>UniBasic</strong> CALCULATE or {} (braces) function executes a virtual attribute. The<br />

dictionary.item must be a valid virtual attribute within the dictionary previously<br />

opened to the @DICT variable with an OPEN statement.<br />

Note: Before you use this function, you must compile the dictionary of the file you will<br />

open to the @DICT variable by using the ECL COMPILE.DICT or CD command.<br />

In the CALCULATE() form, the dictionary.item can be a quoted string or a <strong>UniBasic</strong><br />

variable. The expression uses the data from the current @RECORD during the evaluation<br />

process.<br />

In the {} form, the dictionary.item must be the literal dictionary name with no<br />

quotation marks.<br />

You must open a dictionary to @DICT and read the data record into @RECORD for<br />

the function to work properly.<br />

If these functions are successful, they update the values in @CONV, @FORMAT,<br />

and @HEADER. You can then use these @ variables in other <strong>UniBasic</strong> functions,<br />

such as ICONV, OCONV, and FMT. For more information about @ variables, see<br />

Appendix B, “<strong>UniBasic</strong>@variables.”<br />

CALCULATE 1-118

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!