05.06.2013 Views

Using ChemFinder - CambridgeSoft

Using ChemFinder - CambridgeSoft

Using ChemFinder - CambridgeSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

$SYSTEM_DIR<br />

NOTE: To view a complete list of variables, click<br />

Help on the Enter Cal Command dialog box.<br />

<strong>ChemFinder</strong> provides several variables to allow you<br />

to retrieve information about the current<br />

<strong>ChemFinder</strong> environment. They cannot be set<br />

directly, but are modified as a consequence of other<br />

commands.<br />

For example, the menu command:<br />

Record Next<br />

increments the current RECNO by 1.<br />

The table below shows examples of Environment<br />

Variables:<br />

Command Action<br />

SETVAL 1<br />

$RECNO<br />

SETVAL V1<br />

$NUM_RECS<br />

SETVAL V1<br />

$DTBA_NAME_<br />

LONG<br />

SETVAL V1<br />

$FORM_NAME_<br />

SHORT<br />

SETVAL V1<br />

$SYSTEM_DIR<br />

V1 now equals the number<br />

of the current record<br />

V1 now equals total<br />

number of records in the<br />

current list<br />

V1 now equals, for<br />

example<br />

“c:\chemfinder\mydb.mdb<br />

”<br />

V1 now equals, for<br />

example “mydb”<br />

V1 now equals, for<br />

example,<br />

“c:\chemfndr\system”<br />

Script-Only Commands<br />

*text<br />

:label<br />

label:<br />

GOTO label<br />

IF v1 op v2 stmt<br />

LOOP [count]<br />

ENDLOOP<br />

PAUSE [dseconds]<br />

EXIT<br />

INTERACTIVE ON / OFF<br />

STEP ON / OFF<br />

Script-only commands are useful only in script files,<br />

not interactive CAL.<br />

An asterisk (*) is used to mark a line as a comment<br />

and not a command that should be executed.<br />

Labels and GOTO give a mechanism for jumping<br />

backwards in a script. A label may be any text string<br />

starting or ending with a colon; it must appear prior<br />

to any GOTO that references it.<br />

IF is a standard conditional statement. It compares<br />

two values according to an operator, and then<br />

executes its final statement if the result is true. Valid<br />

operators are:<br />

= < > < ><br />

LOOP begins a section of code that will execute<br />

repeatedly, until ENDLOOP is reached. By default,<br />

the number of times the code executes is equal to the<br />

number of records in the current list, but you can<br />

provide a specific count in the LOOP statement.<br />

PAUSE temporarily stops the script from executing<br />

for a specified number of tenths of a second. If no<br />

number is given, the duration of the pause is 2<br />

seconds.<br />

EXIT ends the script immediately.<br />

INTERACTIVE turns interactive mode on or off.<br />

<strong>ChemFinder</strong> 8 • A-21<br />

Script-Only Commands

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

Saved successfully!

Ooh no, something went wrong!