Yes, they exist. Many of them were discovered by others, unfortunately most of the websites publishing these features (e.g. Marco Koch's page) are not available anymore, so I'm trying to compile a comprehensive list here.


Undocumented sys() statements

OSI documents its sys() function for numbers in the 1-138 range. However, there are few more beyond 138.


Returns subtypes for the used platform: 4.0 for Windows95 and NT, 3.10 for Windows 3.1, and 1 for PPC


Returns the directory of the library and omnis.exe like e.g.

C:\MyAppFolder\MyApp.LBR /WC:\Program Files\Omnis 7.3.6

where 'W' stands for 'working directory'. Will only work, however, when omnis.exe is assigned as default program for lbr files.

From Omnis 7.3.7 onward sys(115) returns the omnis.exe path


These statements operate an internal timer thus enabling the possibility to time procedures or larger code segments

Calculate #F as sys(2002) ;start the internal timer 
Calculate #F as sys(2003) ;print a timing report 

In the V2.0 timing report are 7 columns: NAME, COUNT, TICKS, TIME, microSEC and at the end of the report ticks for the timed operations and ticks since timing switched on.

Calculate #F as sys(2000) ;pause timer, start again with sys(2002)
Calculate #F as sys(2001) ;set timer to 0 

sys(2010, 2011)

These statements return the memory usage of Omnis

Set current list #L1 
Define list {#S1..#S5}
Calculate #F as sys(2010) ;memory used by formats
Calculate #F as sys(2011) ;memory used by variables

First column gives you the format/variable name and the third gives you the amount of memory bytes used.

sys(3000, 3001)

Creates a file seqlogN.txt where N is a incrementing number. The file is created in the current directory.

Calculate #F as sys(3000) ;generates a trace-log in ascii-format
Calculate #F as sys(3001) ;terminates trace log


Purge a format from memory

To purge a particular format from memory, use the command:

Revert format {formatname} 

This removes the format from the OMNIS format cache, discarding any modifications you might have made to it (be sure to do a 'Save format' first if you want to keep the changes). The format will be reloaded automatically the next time it is referenced. Note that if you purge a format from within itself (i.e. if you do a Revert format {$cformat} ), it will be reloaded immediately.


$forecolor 300

Introduced in Omnis 7.3.5 together with the $defaultwindowcolor property, however never was really documented. $forecolor 300 is specially useful for Windows (however works on Macs, too), and assigns the default window system background color to tables and table objects emulating an opaque appearance. This property is runtime only, and must be assigned via $notation once the window has been opened.

Calculate $cwind.$objs.TableObjectName.$forecolor as 300


ENV001 Statements

The ENV00101 extension comes with the Omnis package, however is documented nowhere.

ENV00101 provides 5 commands that (besides ENV001C) are also covered by the included font external fontfnc.dll on win platform - so these commands are specially useful for mac users and also are a better choice for windows for cross platform reasons.

ENV001A(text, fontname, size, style)

returns the length of text text in pixels when displayed on screen, e.g.


returns 25 meaning that 'Test' will have a length of 25 pixels when displayed on screen. This is useful when you need to detect whether a given text is fully visible within a field or not.

ENV001B(fontname, size, style)

Same as above for height of the text in the specified font

ENV001C(numchars, fontname, size, style)

returns the maximum size in pixels a given number of characters will have in the specified font


returns a list (fontname, fonttype, type description) of all fonts installed in your system


sets #F to kTrue, if the specified font fontname is installed, otherwise the flag is set to kFalse


ENV002 Statements

The ENV00202 external includes 4 commands that give you access to binary fields. As above, this external comes with the Omnis package but is not documented.

ENV002A(binfield, start , numbytes)

extracts a given number numbytes of bytes beginning at start from a binary field. This function simply does the same as mid() does with string fields

ENV002B(binfield1, binfield2)

Returns a binary by concatenating binfield1 and binfield2. This function is similar to con()


Calculates a 16-bit checksum for the given binfield - this can be used to check if its contents has changed. Note that this also works for any other field, e.g. string fields or lists


calculates the number of bytes stored in the binfield. This function is similar to len()

Go to top
JSN Boot template designed by