Index

This is the master index of Realizer help topics.

Realizer Language

Boardwatch Commands

Chart Commands

Control Statements

Date-Time Commands

File Commands

Font Commands

Form Commands

General Commands

Input/Output Commands

Log Commands

Math Commands

Menu Commands

Operating System Commands

Scheduler Commands

Spreadsheet Commands

Statistics Commands

Standard User Interface Commands

String Commands

Keyboard Shortcuts

Menu Commands


Realizer Language Index
Realizer Language

By functional groups:

Boardwatch Commands

Chart Commands

Control Statements

Date-Time Commands

File Commands

Font Commands

Form Commands

General Commands

Input/Output Commands

Log Commands

Math Commands

Menu Commands

Operating System Commands

Scheduler Commands

Spreadsheet Commands

Statistics Commands

Standard User Interface Commands

String Commands

Array Notation

Formatting Commands

Order of Operations

Positions

Procedure Parameters

Alphabetical Listing:

Abs

And

ACos

AddToDate

AddToTime

Asc

ASin

ATan2

ATn

BEEP

BoardControl

BoardNew

BoardQ

BoardQUnique

BoardSelect

BoardSetProc

BoardUpdate

Bool

Ceil

ChartBar

ChartControl

ChartControlGrid

ChartControlKey

ChartControlLabels

ChartControlPane

ChartLine

ChartMark

ChartNew

ChartQ

ChartQPtInfo

ChartQUnique

ChartSelect

ChartSelectPane

ChartSetColor

ChartSetKey

ChartSetLineStyle

ChartSetMark

ChartSetProc

ChartSetTitle

ChartSetXAxis

ChartSetXAxis2

ChartSetXView

ChartSetYAxis

ChartText

ChartXYLine

ChartXYMark

CLEAR

Chr$

ClipGet

ClipSet

Cos

DateInfo

DateToNum

DayOfWeek

DDEControl

DDENew

DDEQ

DDEQUnique

DDESelect

DDESetProc

EndValid

Eqv

EXECUTE

EXIT

Exp

Exp10

EXPORT

EXTERNAL

FileClose

FileDelete

FileEOF

FileExport

FileImport

FileMakeName

FileOpen

FilePos

FileQ

FileQUnique

FileRead

FileSeek

FileWrite

Floor

FontControl

FontNew

FontQ

FontQUnique

FontSelect

FOR ... NEXT

FormControl

FormModifyObject

FormNew

FormQ

FormQNum

FormQObject

FormQStr

FormQUnique

FormSelect

FormSetColor

FormSetProc

FormSetObject

FormWait

FUNC

FUNCTION

Help

HelpSetProc

IDLE

IF

IF ... THEN

Imp

Index

INPUT

InStr

Left$

Len

LFLUSH

LOCAL

Log

Log10

LogControl

LogNew

LogQ

LogQSize

LogQStr

LogQUnique

LogSelect

LogSetProc

LOOP

LPRINT

LROWPRINT

Mask

Max

MenuControl

MenuNew

MenuQ

MenuQUnique

MenuSelect

MenuSetCmd

MenuSetProc

Mid$

Min

Mod

Not

NumToDate

Or

Pointer

PRINT

PROC

Product

QDate

QFormat

QNOptMods

QNOptParams

QOptMod

QOptParam

QSys

QVar

RANDOMIZE

RESET

RETURN

Right$

Rnd

Round

ROWPRINT

RUN

RunTot

SchedControl

SchedNew

SchedQ

SchedRemove

SchedSet

SELECT

SetFormat

SetSys

Sgn

SheetControl

SheetNew

SheetQ

SheetQUnique

SheetSelect

SheetSetProc

SheetUpdate

SHELL

Sin

Sprint

Sqr

Sqrt

StartValid

StatMovAvg

StatMovMax

StatMovMin

StatMovTot

StatNorm

StatPack

StatPercent

StatRank

StatRegress

StatSort

StatSwitch

StatUnPack

StdFont

StdOpen

StdPrintConfig

StdSaveAs

STOP

String$

StrToDate

StrToNum

SUB

SubStr$

Sum

Tan

VectSet

WHILE

Xor

ZeroFill

*

^

\

+

-

/

<

<=

>

>=

<>

=


Board Commands
Boardwatch Commands

This section provides an index of all boardwatch commands.

BoardControl

BoardNew

BoardQ

BoardQUnique

BoardSelect

BoardSetProc

BoardUpdate


BoardControl

Syntax

BoardControl(rsAction [; [rsStyleFlags,] [rsLeft, rsTop[, rsWidth, rsHeight]]])

Description

This command controls the appearance of the currently selected board.

rsAction	Function

_Close	Closes the board.

_Show	Displays the board.

_Hide	Hides the board.

_Size	Sets the size and the position of the board, according to the size modifiers: rsLeft, rsTop, rsWidth and rsHeight.

_Print	Prints the board.  The size and position of the chart on the page can be specified with rsLeft, rsTop, rsWidth and rsHeight.  The printer style flags can be set with rsStyleFlags.

_Minimize	Displays the board in its iconic form.

_Maximize	Displays the board filling the entire Realizer window.

_Restore	Restores a maximized or minimized board to its previous size.

rsStyleFlags	Function

_NoHeader	Prevents a header from being printed at the top of the page.

_NoFooter	Prevents the page number from being printed at the bottom of the page.

_NoHLines	Prevents the horizontal lines in the board from being printed.

_NoVLines	Prevents the vertical lines in the board from being printed.

See also

BoardNew, BoardSelect, BoardQ, BoardUpdate, LFLUSH


BoardNew

Syntax

BoardNew(rsBoardNum, fTemplate [, fData1 [..., fDataN]] [; asTitle  [, rsStyle]])

Description

This command creates a new board.  rsBoardNum is the board identification number used to refer to the board, and should be between 1 and 32767.  If a board with that number already exists, the old one will be destroyed before the new one is created.

fTemplate is the template family for the board:

Member	Description

fTemplate.Member	An alpha array containing a list of the family members that should be displayed in the board fields.

fTemplate.Title	An optional alpha array that contains a list of names to use as the titles for the fields.  By default, the member names are used as the titles.

fTemplate.Format	An optional alpha array that contains a list of format strings to use when displaying the data in each field.  By default, the variable's default format is used.

fTemplate.Layout	An optional real scalar that controls the layout of the board.

fTemplate.Layout can be the sum of the following flags:

fTemplate.Layout	Specifies

_FamilyRowwise	Each row of the board should represent a family, and the columns the members within them.  This is the default.

_FamilyColwise	The normal layout of the board should be transposed, with each column of the board representing a family, and the rows representing the members within them.

_NoFieldHeaders	The headings for the fields should not be put in the board.

_NoFamilyHeaders	The headings for the families should not be put in the board.

_Default	Use the default settings (Rowwise families and both sets of headings).

fData1 through fDataN are a list of families that should be placed in the board.

The title for the board window can be specified with asTitle.  By default the title is "Board rsBoardNum".  rsStyle controls the appearance of the window.  It can be the sum of any of the following flags:

rsStyle	Function

_Close	Allows the board to be closed from the board window's system menu or the Realizer File Close menu.

_Frame	Places a frame around the board window.  Cannot be used in conjunction with _Title or _Size.

_Size	Places a thick sizing frame around the board window.  If _Title is also set, a maximize icon will be placed in the title bar.

_Title	Puts a title bar at the top of the window.  Allows the window to be moved.

_Minimize	Allows the window to be minimized from the board window's system menu.  If _Title is also set, a minimize icon will be placed in the title bar.

_HotClick	Causes mouse clicks in the board to be processed even when the board is not front.  By default, a mouse click in a background window only brings that window forward.

By default, the board's window style is _Title + _Size + _Minimize + _Close.

When a board is created it is invisible.  BoardControl can be used to make it visible.

See also

BoardQUnique, BoardSelect, BoardControl, BoardUpdate


BoardQ

Syntax

rg = BoardQ(rsAction  [; rsBoardNum [, rsFormNum]])

Description

This function returns information about a board.  rsBoardNum is the number of the board.  If the board is in a form, rsFormNum should also be specified.

If a board is not specified, the currently selected board is used.  If there is no current board, or if the specified board does not exist, BoardQ returns a real scalar value of 0.

rsAction	Function

_Exists	Returns 1 if the board exists.  Otherwise it returns 0.

_Selected	Returns a two element array containing the number of the currently selected board.  The first element contains the board number.  If the board is in a form, the second element contains the form number.  Otherwise the second element is zero.

_Size	Returns a four element array representing the size and position of the board in pixels.  The first element is the location of the left side of the board.  The second is the location of the top of the board.  The third is the width of the board. The fourth is the height of the board.

_Title	Returns the title of the board.

_Style	Returns the style of the window, as set by BoardNew.

_HWnd	Returns the window handle of the board for use with external procedures and custom controls.

See also

BoardNew, BoardControl


BoardQUnique

Syntax

rs = BoardQUnique

Description

This function generates a unique board number for use with BoardNew.

See also

BoardNew


BoardSelect

Syntax

BoardSelect(rsBoardNum  [, rsFormNum])

Description

This command makes the specified board the current board.  All subsequent board commands will effect this board.

rsBoardNum is the identification number of the board.  If the board is in a form, rsFormNum should also be specified.  It is an error to select a board that does not exist.

See also

BoardNew, BoardControl


BoardSetProc

Syntax

BoardSetProc[(procName  | asMacroName)]

Description

This command sets the procedure or macro to invoke when a board family is double-clicked or the board is closed.  The procedure being set as a board procedure must expect two parameters.  The first is the tool procedure parameter array.  The second is the actual family that was double-clicked.

If a procedure or macro is not specified, any procedure already attached to the current board is disassociated from the board.


BoardUpdate

Syntax

BoardUpdate[(fData1 [..., fDataN])]

Description

This command updates families or cells in the current board.  If a specified family is not in the board, it is added.  If a single family member is specified, only its cell is updated.  It is an error to specify a member that is not in the board.

If no families are specified, then all the families in the board are updated.

When new families are added after the board has been shown, the board is not automatically resized.  BoardControl with default size parameters can be used to reset the board to its new size.

See also

BoardNew, BoardControl, BoardSelect


Chart Commands

This section provides an index of all chart commands.

ChartBar

ChartControl

ChartControlGrid

ChartControlKey

ChartControlLabels

ChartControlPane

ChartLine

ChartMark

ChartNew

ChartQ

ChartQPtInfo

ChartQUnique

ChartSelect

ChartSelectPane

ChartSetColor

ChartSetKey

ChartSetLineStyle

ChartSetMark

ChartSetProc

ChartSetTitle

ChartSetXAxis

ChartSetXAxis2

ChartSetXView

ChartSetYAxis

ChartText

ChartXYLine

ChartXYMark


ChartBar

Syntax

ChartBar(rvHigh [, rvLow  [, rvClose [, rvOpen ]]] [, dvDates] [; rsWidth])

Description

This command draws a bar chart of the data in the current chart with the current data color.  If only one array is used, a conventional bar chart is drawn.  If rvLow is specified, a high-low chart is drawn with the bars ranging from rvLow to rvHigh.  rvClose can be used to create a high-low-close chart, with a short horizontal mark placed on each bar at rvClose.  If rvOpen is used, a high-low-close-open chart is drawn, with another short horizontal mark on each bar at rvOpen.

If dvDates is specified, each element is correlated with the corresponding value in dvDates.  The x position for a given element i will be determined by matching dvDates[i] to the x-axis date-time array set by ChartSetXAxis.

rsWidth controls the width of the bars.  By default, bars are one pixel wide.

See also

ChartLine, ChartMark, ChartSetXAxis, ChartSetXAxis2


ChartControl

Syntax

ChartControl(rsAction [; [rsStyleFlags,] [rsLeft, rsTop[, rsWidth, rsHeight]]])

Description

This command controls the appearance of the currently selected chart.

rsAction	Function

_Close	Closes the chart.

_Show	Displays the chart.

_Hide	Hides the chart.

_Size	Sets the size and the position of the chart, according to the size modifiers: rsLeft, rsTop, rsWidth and rsHeight.  These values are specified using Realizer's position notation.

_Print	Prints the chart.  The size and position of the chart on the page can be specified with rsLeft, rsTop, rsWidth and rsHeight using Realizer's position notation.  The printer style flags can be set with rsStyleFlags.

_Minimize	Displays the chart in its iconic form.

_Maximize	Displays the chart filling the entire Realizer window.

_Restore	Restores a maximized or minimized chart to its previous size.

rsStyleFlags	Function

_NoHeader	Prevents a header from being printed at the top of the page.

_NoFooter	Prevents the page number from being printed at the bottom of the page.

See also

ChartNew, ChartSelect, ChartQ, LFLUSH


ChartControlGrid

Syntax

ChartControlGrid(rsAction, rsWhich)

Description

This command controls the grid in the current chart pane.  The horizontal and vertical lines can be hidden and shown independent of one another.

rsAction	Function

_Show	Causes the specified grid lines to become visible.

_Hide	Causes the specified grid lines to become invisible.

rsWhich	Specifies

_Vert	The vertical grid lines.

_Horiz	The horizontal grid lines.

_All	The horizontal and vertical grid lines.

See also

ChartControlLabels, ChartSetTitle, ChartSelectPane, ChartSelect


ChartControlKey

Syntax

ChartControlKey(rsAction [; rsLeft, rsTop [, rsCols]])

Description

This command controls the key in the currently selected chart.

rsAction	Function

_Show	Displays the key.

_Hide	Hides the key.

_Size	Sets the size and position of the key.  rsLeft and rsTop define the position, using the Realizer position notation.  rsCols sets the number of columns in the key.  The default is a single column.

_Clear	Clears all items from the key.

See also

ChartSetKey, ChartControl


ChartControlLabels

Syntax

ChartControlLabels(rsAction , rsWhich)

Description

This command controls the display of chart titles and axes.

rsAction	Function

_Show	Shows the axis and/or titles, as specified by rsWhich.

_Hide	Hides the axis and/or titles, as specified by rsWhich.

_Clear	Clears the axis and/or titles specified by rsWhich.

rsWhich is a sum of the following constants:

rsWhich	Specifies

_XAxis	The x-axes.

_YAxis	The y-axes.

_Title	All four chart titles.

_All	Both axes and all four chart titles.

Clearing an axis sets it to its default, as determined by the data in the chart or pane.  Clearing the y-axis affects all the y-axes in the chart, not just the axis for the current pane.  Clearing the x-axis also affects the secondary x-axis if one has been set.

If the axes and the titles are hidden, then the chart border will also be hidden and the entire chart area will be used for plotting.

See also

ChartSetTitle, ChartSetXAxis, ChartSetXAxis2, ChartSetYAxis, ChartSetXView


ChartControlPane

Syntax

ChartControlPane(rsAction [; rsTop, rsHeight  [, rsAxisLoc]])

Description

This command controls the current pane within the current chart.

rsAction	Function

_Size	Sets the size of the current pane using the Realizer position notation.  Panes are always the entire width of the chart.  The vertical position and height can be set with rsTop and rsHeight.  The location of the y-axis in the pane can be specified with rsAxisLoc.

_Clear	Clears all the plots in the current pane.

rsAxisLoc	Function

_None	Hides the y-axis.

_Left	Displays the y-axis on the left side of the pane.

_Right	Displays the y-axis on the right side of the pane.

By default, all the panes are the full size of the chart and have y axes on the right side.

See also

ChartSelectPane, ChartControl, ChartNew


ChartLine

Syntax

ChartLine(rvData  [, rvBool] [, dvDates])

Description

This command creates a plot of lines connecting the points in an array.  The index of the element in rvData is used as the x coordinate, and the value of the element of rvData is used as the y coordinate.

If rvBool is given, then lines are only drawn from points for which the corresponding value in rvBool is non-zero.  If rvBool is not given, all the lines are drawn.

If dvDates is given, each element in the data array is correlated with the corresponding time value in dvDates.  The x position for a given element i will be determined by matching dvDates[i] to the x-axis date array set by ChartSetXAxis.

The plot is drawn in the current pane of the current chart, using the current line color, style, and width.

See also

ChartSetColor, ChartSetLineStyle, ChartXYLine, ChartMark, ChartBar


ChartMark

Syntax

ChartMark(rvData  [, rvBool] [, dvDates])

Description

This command plots a marker for each value in rvData.  The index of rvData is used as the x coordinate and the value of rvData is used as the y coordinate.

If rvBool is given, then markers are only plotted for points for which rvBool is non-zero.  If rvBool is not given, then all the markers are drawn.

If dvDates is given, each element in the data array is correlated with the corresponding time value in dvDates.  The x position for a given element i will be determined by matching dvDates[i] to the x-axis date array set by ChartSetXAxis.

The chart is drawn in the current pane, using the current chart color and mark.

See also

ChartSetMark, ChartSetColor, ChartXYMark, ChartLine, ChartBar


ChartNew

Syntax

ChartNew(rsChartNum [, rsPanes][; asTitle  [, rsStyle]])

Description

This command creates a new chart.  rsChartNum is the chart identification number used to refer to the chart, and should be between 1 and 32767.  If a chart with that number already exists, the old chart will be destroyed before the new one is created.

rsPanes specifies the number of panes in the chart.  The default is 1.  The title for the chart window can be specified with asTitle.  By default the title is "Chart rsChartNum".

rsStyle controls the appearance of the window.  It can be the sum of any of the following flags:

rsStyle	Function

_Close	Allows the chart to be closed from the chart window's system menu or the Realizer File Close menu.

_Frame	Places a frame around the chart window.  Cannot be used in conjunction with _Title or _Size.

_Size	Places a thick sizing frame around the chart window.  If _Title is also set, a maximize icon will be placed in the title bar.

_Title	Puts a title bar at the top of the window.  Allows the window to be moved.

_Minimize	Allows the window to be minimized from the chart window's system menu.  If _Title is also set, a minimize icon will be placed in the title bar.

_HotClick	Causes mouse clicks in the chart to be processed even when the chart is not front.  By default, a mouse click in a background window only brings that window forward.

By default, the chart's window style is _Title + _Size + _Minimize + _Close.

When a chart is created it is invisible.  ChartControl can be used to make it visible.

Chart Defaults

Window title	Chart n

Window style	_Title + _Size + _Minimize + _Close

Number of panes	1

Data color	_Blue

Background color	_White

Text color	_Black

Marker style	_Circle

Line style	_Solid

Line width	1

See also

ChartQUnique, ChartSelect, ChartControl, ChartControlPane


ChartQ

Syntax

rg = ChartQ(rsAction  [; rsChartNum [, rsFormNum]])

Description

This command returns information about a chart.  rsChartNum is the number of the chart.  If the chart is in a form, rsFormNum should also be specified.

If a chart is not specified, the currently selected chart is used.  If there is no current chart, or the specified chart doesn't exist, a real scalar value of 0 is returned.

rsAction	Function

_Exists	Returns 1 if the chart exists.  Otherwise it returns 0.

_Selected	Returns a two element array containing the number of the currently selected chart.  The first element contains the chart number.  If the chart is in a form, the second element contains the form number.  Otherwise the second element is zero.

_Size	Returns a four element array representing the size and position of the chart in pixels.  The first element is the location of the left side of the chart.  The second is the location of the top of the chart.  The third is the width of the chart. The fourth is the height of the chart.

_Title	Returns the title of the chart.

_Style	Returns the style of the window, as set by ChartNew.

_HWnd	Returns the window handle of the chart for use with external procedures and custom controls.

See also

ChartNew, ChartControl


ChartQPtInfo

Syntax

rv = ChartQPtInfo(rsX, rsY  [, rsPane])

Description

This function converts a screen relative position to a data relative position.  It is typically used after a mouse click in a chart to correlate a pixel position with a particular data point.

rsX and rsY are the x and y coordinates, in pixels, of the location in the chart.  rsPane is used to resolve conflicts if several panes overlap.

A three element array is returned.  The first two elements are the x and y coordinates of the point in data coordinates.  If the x-axis was set to a date-time array with ChartSetXAxis, the x value returned will be an index into that array with a fractional portion indicating how close the point was to the next element.  For example, if the x value is 3.2, then the clicked point is 2 tenths of the way between elements 3 and 4 of the array.

The third element of the array is the number of the pane containing the point.  If several panes overlap and rsPane is not specified, the lowest numbered pane is returned.  If rsPane is specified, and it is among the overlapping panes, the third element will be rsPane.

If the clicked point is not within any pane, all three elements in the returned array will be zero.

If the size of the chart changes between the time the x and y coordinates are received from the chart procedure and the time ChartQPtInfo is called, the result will be based on the new size of the chart, and may therefore differ from that expected.

See also

ChartSetProc


ChartQUnique

Syntax

rs = ChartQUnique

Description

This command generates a unique chart number for use with ChartNew.

See also

ChartNew


ChartSelect

Syntax

ChartSelect(rsChartNum  [, rsFormNum])

Description

This command makes the specified chart the current chart.  All subsequent chart commands will affect this chart.

rsChartNum is the identification number of the chart.  If the chart is in a form, rsFormNum should also be specified.  It is an error to select a chart that does not exist.

See also

ChartNew, ChartSelectPane, ChartControl


ChartSelectPane

Syntax

ChartSelectPane(rsPane)

Description

This command makes rsPane the current pane in the current chart.  All subsequent chart commands will apply to this pane.  It is an error to select a pane that does not exist.

See also

ChartControlPane, ChartSelect, ChartNew


ChartSetColor

Syntax

ChartSetColor(rgColor [; rsWhich])

ChartSetColor(rsRed , rsGreen, rsBlue [; rsWhich])

Description

This command sets the color for the chart data, text, and background.

The color can be specified in several ways.  One of the Realizer predefined colors can be used by specifying it as rgColor.  If a specific RGB color is needed, rsRed, rsGreen, and rsBlue can be specified as values ranging from 0 to 1.  rgColor can also be a three element array with the RGB values.

rsWhich indicates whether the color is for the data (lines, markers, and text drawn in the chart), the text (the axes, grid lines, and titles) or the background color of the chart. If rsWhich is not given, the data color is set.

Changes to the data color affect the drawing commands that come after the ChartSetColor.  Data plots that are already in the chart are unaffected.

rsWhich	Specifies

_Background	The background color of the chart.

_Data	The data in the chart (lines, bars, markers, and ChartTexttext).

_Text	The text in the chart (axes, grid lines, and titles).

rgColor

_Black	_Evergreen	_LightYellow	_DarkGreenBlue

_White	_MediumBlue	_LimeGreen	_NavyBlue

_Gray	_Purple	_LightGreen	_DarkPurple

_Red	_Turquoise	_Maroon	_Tan

_Green	_Brown	_Pink	_GrayGreen

_Blue	_Pale	_Orange	_LightGray

_Cyan	_Cream	_LightEvergreen	_Violet

_Magenta	_GreenYellow	_DarkBrown	_BlueGreen

_Yellow	_MediumGreen	_MediumBrown

_Brick	_PowderBlue	_DarkGreen

See also

ChartSetLineStyle, ChartSetMark


ChartSetKey

Syntax

ChartSetKey(asText [, rsType])

Description

This command adds an item to the key of the current chart.  asText is the text for the item.  rsType specifies the type of the graphic sample used for the item, either a line segment, a marker, or a small bar.  The default sample is a line segment.

rsType	Specifies

_None	No sample is used.

_Line	A short line segment in the current data color and line style.

_Marker	The current marker in the current data color.

_Bar	A small bar in the current data color.

See also

ChartControlKey


ChartSetLineStyle

Syntax

ChartSetLineStyle(rsStyle  [, rsWidth])

Description

This command sets the pattern and width of lines drawn by chart commands.  rsWidth is specified in pixels.  The default is a solid line, one pixel wide.  Lines greater than one pixel wide are always drawn as solid lines.

rsStyle	Specifies

_Solid	A solid line.

_Dash	A dashed line.

_Dot	A dotted line.

_DashDot	A dashed dotted line.

_DashDotDot	A dotted dashed line.

See also

ChartLine, ChartXYLine, ChartSetColor, ChartSetKey, ChartSetMark


ChartSetMark

Syntax

ChartSetMark(rsMark)

Description

This command sets the character that will be used as a marker for charts created by ChartMark and ChartXYMark.

rsMark

_Dot	_Point	_Plus	_Star

_Circle	_XMark	_Triangle	_Rectangle

_Diamond	_RectCross	_UpsideT	_RightSideT

_VerticalLine	_Number0	_Number1	_Number2

See also

ChartMark, ChartXYMark, ChartSetColor, ChartSetKey


ChartSetProc

Syntax

ChartSetProc[(procName  | asMacroName)]

Description

This command sets the procedure or macro to invoke when the chart is clicked in or closed.  The procedure being set as a chart procedure must expect one parameter, called the tool procedure parameter array.

If a procedure or macro is not specified, any procedure already attached to the current chart is disassociated from the chart.


ChartSetTitle

Syntax

ChartSetTitle(asTitle [, rsWhich])

Description

This command sets the text for a chart title.  This is not the title of the chart window, but a text string along the top, bottom, right, or left of the chart.  asTitle is the text for the title and rsWhich specifies the location of the title.

Titles are shown and hidden with the ChartControlLabels command.

rsWhich	Function

_Left	Sets the title on the left side of the chart.

_Right	Sets the title on the right side of the chart.

_Top	Sets the title on the top of the chart.

_Bottom	Sets the title on the bottom of the chart.

If rsWhich is not specified, the title on the top of the chart is set.  Characters in left and right side titles will be oriented normally.

See also

ChartControlLabels, ChartNew


ChartSetXAxis

Syntax

ChartSetXAxis[(rsStart, rsEnd)]

ChartSetXAxis(dvTimes, asFormat, rsInterval1 [..., rsIntervalN])

Description

This command sets the range and values shown on the x-axis of the current chart.

The first form of the command is used to specify a starting and ending value for the x-axis.  Data plotted outside this range will not be visible.  If no parameters are given, the x-axis will be rescaled according to the data in the chart.

The second form creates an x-axis labeled with date-time values.  The dvTimes array contains a set of date-time values to correspond to each item in the plotted data.  This can be used in conjunction with the date correlation array specified with the ChartLine, ChartMark, and ChartBar commands to correlate date-time values to the data in the chart.

asFormat specifies how the date-time values should be formatted when they appear on the axis.  Any of the formatting commands that apply to date-time values are allowed.

rsInterval1 specifies the largest interval over which axis ticks should be placed.  Additional intervals can also be specified in decreasing size.  For example, if axis ticks are needed every 30, 10, and 2 values on the x-axis, ChartSetXAxis(datevec, myformat, 30, 10, 2) can be used.  The number of labels that appear depends upon the current size of the chart.

See also

ChartSetXAxis2, ChartSetXView, ChartSetYAxis, Formats


ChartSetXAxis2

Syntax

ChartSetXAxis2[(asFormat, rsInterval1 [..., rsIntervalN ])]

Description

This command displays a secondary x-axis.  This axis appears below the axis created by ChartSetXAxis, and uses the date-time array set by ChartSetXAxis.  It is an error to create a second axis if the date-time format of ChartSetXAxis was not used.

asFormat specifies a text formatting string, using any of the date-time formats.  rsInterval1 through rsIntervalN specify a set of decreasing interval values at which labels and ticks will be placed on the axis.  Labels are shown whenever they can fit.

If the command is used without any parameters, the secondary x-axis will be removed.

See also

ChartSetXAxis, ChartSetYAxis, Formats


ChartSetXView

Syntax

ChartSetXView([gsBeg, gsEnd])

Description

This command sets the range of x values that are displayed in the current chart.  The entire chart may be viewed through a scroll bar added to the bottom of the chart.

The range can be defined by two real values or by two date-time values that correspond to a date-time array specified with the ChartSetXAxis command.

A horizontal scroll bar will appear at the bottom of the chart if the range to be viewed is less than the entire chart, or is less than the range defined with ChartSetXAxis.  If ChartSetXView is used without any parameters, or with a range where gsEnd is less than or equal to gsBeg, the scroll bar is removed and the view returns to the entire range.

See also

ChartSetXAxis, ChartSetYAxis


ChartSetYAxis

Syntax

ChartSetYAxis[([rsLow, rsHigh] [; asFormat [, rsMinIncr [, rsIncrMethod ]]])]

Description

This command sets the range and label format for the y-axis of the current pane.

rsLow and rsHigh specify the lowest and highest values for the y-axis.  asFormat is an optional formatting string for the numbers on the axis.  It can contain any of the numeric PRINT USING formats.

If rsMinIncr is given, axis labels are guaranteed to be separated by at least that value.  If rsMinIncr is too small for the range of the y-axis, then rsIncrMethod determines how the increments are adjusted to fit the data.

rsIncrMeth	Description

0	Do not adjust increments.

1	Try multiplying by 2, 5, 10, 20, 50, 100, 200, ..

2	Try multiplying by 2, 4, 8, 16, 32, ..

3	Use the endpoints exactly and fit increments if possible.

If the increments do not fit, default values will be used.  If ChartSetYAxis is used without any parameters, the y-axis will be rescaled according to the data in the chart.

If the range requested is smaller than the actual range of y values in the pane, then the plots will be drawn outside of the pane.  They will be clipped within the chart, but not within the pane.

See also

ChartSetXAxis, ChartSetXView, Formats


ChartText

Syntax

ChartText(rgX, rgY, agText [, rsMapCode [, rsPosition]])

Description

This command draws text in the chart at a specific location in the current chart pane.  rgX and rgY are the point where the text is drawn.  agText is the string to draw.  The current data color and a default font are used for the text.

The location can be specified in a position relative to the screen or the data in the chart.  Data relative positions are based on the data in the chart, and will be redrawn with the data if the chart is rescaled or resized.  Screen relative text is placed in the chart using Realizer's position notation, and the text remains fixed in relation to the chart pane.  The default is data relative.

rsMapCode	Specifies

_Screen	Screen relative text.

_Data	Data relative text.

If the text is plotted relative to the data and the axes have not yet been defined then the text will not be shown until the axes are set.

rsPosition determines where the text is drawn with respect to its location.  It specifies the corner or side of the text that is placed at the given coordinates.  rsPosition is the sum of the following constants:

rsPosition	Function

_Left	Positions the left side of the text at rgX.

_Right	Positions the right side of the text at rgX.

_Top	Positions the top of the text at rgY.

_Bottom	Positions the bottom of the text at rgY.

_Center	Centers the text at the point rgX, rgY.

The default for rsPosition is _Bottom + _Left.  For screen relative data, the default position will be adjusted if the text is already justified within the pane.

See also

ChartSetColor, ChartSetTitle, ChartControlLabels


ChartXYLine

Syntax

ChartXYLine(rvX, rvY  [, rvBool])

Description

This command draws a set of lines in the current chart pane connecting each (x, y) point specified by rvX and rvY with the next point.

If rvBool is specified, then lines are only drawn from points for which rvBool is non-zero.  This allows discontinuous vector graphs to be drawn.

The lines will be drawn with the current line color, style, and width.

See also

ChartSetColor, ChartSetLineStyle, ChartLine, ChartXYMark


ChartXYMark

Syntax

ChartXYMark(rvX, rvY [, rvBool])

Description

This command creates a scatter plot.  It draws a mark at each (x, y) point specified by rvX and rvY.

If rvBool is specified, then a marker is drawn only if the corresponding element in rvBool is non-zero.

See also

ChartSetMark, ChartSetColor, ChartMark, ChartXYLine


Control Statements

This section contains a description of all flow control statements.

EXIT

FOR ... NEXT

IF ... THEN

LOOP

RETURN

SELECT

WHILE


EXIT

Syntax

EXIT [FOR | IF | LOOP | MACRO | PROC | PROGRAM | SELECT | SUB | SYSTEM | WHILE]

Description

This command breaks out of a loop, program block, or conditional statement.  The program continues after the innermost block of the structural type being exited.

EXIT MACRO exits the current EXECUTE or RUN statement.  EXIT SYSTEM is equivalent to closing the Realizer window.

See also

EXECUTE, FOR, IF, LOOP, PROC, RUN, SELECT, WHILE


FOR...NEXT
FOR

Syntax

FOR rsvLoop = rsBeg TO rsEnd [STEP rsStep]

statements

NEXT [rsvLoop]

Description

This control statement executes a set of statements a fixed number of times.  rsLoop is a variable that takes on the values from rsBeg to rsEnd.  Each time though the loop, rsLoop is incremented by rsStep, or 1 if rsStep is not specified.  When rsvLoop is greater than rsEnd, the loop is exited.  If rsStep is negative, the loop repeats until rsvLoop is less than rsEnd.

Although rsBeg, rsEnd, and rsStep can be expressions, they are evaluated only once at the beginning of the FOR loop.

The EXIT FOR statement can be used to exit a FOR loop prematurely.

See also

EXIT, LOOP, WHILE, IDLE


IF...THEN
IF

Syntax

IF rsTest THEN

statements1

[ELSEIF rsTest2 THEN

statements2]

[... ELSEIF rsTestN THEN

statementsN]

[ELSE

statementsE]

END IF

Description

When used as a control structure, rsTest is evaluated and if it is non-zero, then statements1 are executed.  Otherwise, if an ELSEIF is present, then rsTest2 is evaluated and if it is non-zero, statements2 are executed.  This continues for each successive condition.  If none of the conditions are true and an ELSE clause is present, then statementsE are executed.

See also

SELECT, WHILE, IF (function)


LOOP

Syntax

LOOP

statements

[EXIT LOOP]

END LOOP

Description

This control structure repeats a set of statements indefinitely.  The loop ends when an EXIT LOOP statement is encountered.

See also

EXIT, WHILE, FOR


RETURN

Description

RETURN expression

Syntax

This statement is used within a function to return a value.  When the RETURN is encountered, the function is exited and the value expression is returned.

See also

FUNC


SELECT

Syntax

SELECT CASE gsExpr

CASE testlist1

statement1

.

.

.

[CASE testlistN

statementN ]

[CASE ELSE

statementsE ]

END SELECT

Description

The SELECT control structure evaluates an expression and compares it to a group of ranges.  Each range has an associated block of statements.  The first group whose range contains the value of the expression has its statements executed.

The test lists are of the form:

test1 [..., testN]

If any of the tests are true, the associated statements are executed.  The possible forms for a test are shown below:

expr	e.g.  CASE 5, 7

exprLow TO exprHigh	e.g.  CASE 10 TO N

IS relOp exp	e.g.  CASE IS < Sin(x)

relOp can be <,  <=,  >,  >=,  <>, or  =.

See also

IF


WHILE

Syntax

WHILE expression

statements

END WHILE

Description

This control structure repeats a set of statements as long as an expression is true.  When the WHILE statement is encountered, expression is evaluated.  If it is non-zero then the statements are executed up to the END WHILE.  The expression is then evaluated again.  This continues until the expression evaluates to zero.

The WHILE loop can also be terminated by an EXIT WHILE statement.

See also

EXIT, LOOP, FOR, IF


Date-Time Commands

This section contains a list of the date-time functions.

AddToDate

AddToTime

DateInfo

DateToNum

DayOfWeek

NumToDate

QDate


AddToDate

Syntax

dg = AddToDate(dgOrigDate, rgYears [, rgMonths [, rgDays [, rgHours [, rgMinutes [, rgSecs]]]]])

Description

This function adds the specified number of years, months, days, hours, minutes, and seconds to a date-time value.  It is not necessary to specify all of the values.

See also

AddToTime


AddToTime

Syntax

dg = AddToTime(dgOrigTime, rgHours [, rgMinutes [, rgSeconds]])

Description

This function adds a specified number of hours, minutes, and seconds to a date-time value.

See also

AddToDate


DateInfo

Syntax

rv = DateInfo(dsDate)

Description

This function returns an array containing information about a date-time value.  The array contains the following elements:

Element	Description

rv[_DI_Year]	The full year (e.g. 1991)

rv[_DI_Month]	The number of the month (e.g. 4 for April)

rv[_DI_DayOfMonth]	The date within the month (e.g. 8 for the 8th)

rv[_DI_DayOfYear]	The day within the year since January 1  (e.g. 99 for April 8th (non-leap year)).

rv[_DI_DateNum]	The date number, as returned by DateToNum (e.g. 33336 for 4/8/91).

rv[_DI_DayOfWeek]	The day of the week, as returned by DayOfWeek (e.g. 1 for Mon, Apr 8th).

rv[_DI_Hour]	The hour of the day, from 0 to 23 (e.g. 14 for 2:34 PM).

rv[_DI_Minute]	The minute of the hour, from 0 to 59 (e.g. 34 for 2:34 PM).

rv[_DI_Second]	The second of the minute, from 0 to 59 (e.g. 56 for 2:34:56 PM).

rv[_DI_TimeNum]	The time number, as returned by DateToNum (e.g. 52440 for 2:34 PM).

See also

DateToNum, DayOfWeek


DayOfWeek

Syntax

rg = DayOfWeek(dgDate)

Description

This function returns a number between 1 and 7 indicating what day of the week a date-time value falls on.  Monday is 1, Tuesday is 2, and so on.

See also

DateInfo, DateToNum


DateToNum

Syntax

rg = DateToNum(dgDate  [, rsWhich])

Description

This function returns a number representing either the date or the time portion of a date-time value.

rsWhich	Function

_DateNum	Returns the date number of the date-time value.

_TimeNum	Returns the time number of the date-time value.

By default the date portion is returned.

The date number represents the number of the day, where January 1, 1900 is 2.  The time number represents the number of seconds since midnight.

The value 2 is used for 1/1/1900 to provide compatibility with Excel.  Excel uses 1 for 1/1/1900, but treats 1900 as a leap year, which it was not.  By treating 1/1/1900 as 2, Realizer date numbers correspond to Excel numbers for any dates after 3/1/1900, and the number of days since 1/1/1900 is computed correctly.

See also

NumToDate, DateInfo, DayOfWeek


NumToDate

Syntax

dg = NumToDate(rgDateNum [, rgTimeNum])

Description

This function creates a date-time value from real values.  rgDateNum is the number of the day, as returned by DateToNum and DateInfo.  rgTimeNum is the number of seconds since midnight.  If the time number is not specified, 00:00:00 is used.

See also

DateToNum, StrToDate, DateInfo


QDate

Syntax

ds = QDate

Description

This function returns the current date and time, as a date-time scalar.

See also

DayOfWeek


File Commands

This section contains a list of the file I/O functions.

FileClose

FileDelete

FileEOF

FileExport

FileImport

FileMakeName

FileOpen

FilePos

FileQ

FileQUnique

FileRead

FileSeek

FileWrite


FileClose

Syntax

FileClose(rsFileNum)

Description

This command closes a file that was opened with FileOpen.  When a file is closed, the associated system resources are freed.

rsFileNum is the file identification number used to open the file with FileOpen.

The RESET command can be used to close all open files.

See also

FileOpen


FileDelete

Syntax

FileDelete(asFileName)

Description

This command deletes a file.  If the full path is not specified, the first directory from the _LoadDir path is searched for the file.

See also

SetSys(_LoadDir), QSys(_LoadDir), FileQ


FileEOF

Syntax

rs = FileEOF(rsFileNum)

Description

This function indicates whether the file pointer for file rsFileNum has been moved past the end of the file.  It returns 1 if the end of the file has been reached and 0 otherwise.

See also

FilePos, FileSeek, FileQ


FileExport

Syntax

FileExport(gsFile, rsType, rsFormat, fTemplate  | ggvName1 [..., ggvNameN])

Description

This command writes values to a file in various high-level formats.

gsFile specifies the file into which the data will be written.  It is normally a string containing the file name, although some of the formats allow a file number to be used instead.  If the full path of the file name is not specified then the first directory from the _LoadDir path will be used.

rsType indicates the type of file to create.  rsFormat specifies how the data will be written.

rsType	Description

_Realizer	The file is written using Realizer's internal format.

_Excel	The file is written as an Excel (.XLS) worksheet file.

_Lotus	The file is written as a Lotus (.WKS) spreadsheet file.

_Text	The file is written as text.

_Binary	The file is written as binary data.

rsFormat	Description

_Named	The file is written using the Named format.

_Plain	The file is written using the Plain format.

For _Plain or _Binary files, fTemplate specifies the variables and formats to write.  For the other formats, ggvName1 through ggvNameN specify the variables that will be written to the file.

See also

FileImport, FileOpen, FileWrite, SetSys(_Separator), QSys(_Separator)


FileImport

Syntax

FileImport(gsFile, rsType, rsFormat  [, fTemplate ] [, ggvVar1 [..., ggvVarN  ]]  [; rsStart [, rsCount]])

Description

This command is used to import data from a file.  Various data formats can be imported, including those written with FileExport.

gsFile specifies the file from which the data will be read.  It is normally a string containing the file name, although some of the formats allow a file number to be used instead.  If the full path of the file name is not specified then the _LoadDir path is searched.

rsType indicates the type of file to read.  rsFormat specifies the format of the data within the file.

rsType	Description

_Realizer	The file was written using Realizer's internal format.

_Excel	The file is an Excel worksheet file.

_Lotus	The file is a Lotus spreadsheet file.

_Text	The file is text.

_Binary	The file is binary data.

rsFormat	Description

_Named	The file is read using the Named format.

_Plain	The file is read using the Plain format.

For _Named files, the file itself contains the names of the variables to import.  For _Plain files, fTemplate specifies the variables to read and their formats.

If ggvName1 through ggvNameN are specified, then only those variables will be imported.

rsStart and rsCount are used to read a section of a file.  rsStart indicates the starting row to import, and rsCount indicates the maximum number of rows to read.

See also

FileExport, FileRead, FileOpen, SetSys(_LoadDir), QSys(_LoadDir)


FileMakeName

Syntax

as = FileMakeName[(asDirName)]

Description

This function returns a unique file name.  If asDirName is specified, the file name will be unique within that directory.  Otherwise, it will be unique within the first directory in the _LoadDir path.

See also

FileOpen, SetSys(_LoadDir), QSys(_LoadDir)


FileOpen

Syntax

FileOpen(rsFileNum, asFile [, rsOpenMode])

Description

This command opens a file for reading and/or writing.  rsFileNum is the file number to use when referencing the file with other commands.  asFile is the name of the file.

If a full path is not specified, files opened for reading will be searched for in the _LoadDir path.  Files being written will be created in the first directory of the _LoadDir path.

rsOpenMode specifies whether the file is opened for reading, writing or both.  By default, the file is opened as a read-only file.

rsOpenMode	Description

_Read	The file is opened for reading only.

_Write	The file is opened for writing only.  The file is created if it does not already exist, and cleared if it does.

_Append	The file is opened for writing only.  Current data will be left intact and the file pointer is positioned at the end of the file.

_ReadWrite	The file is opened for both reading and writing.

See also

FileQUnique, FileClose, FileRead, FileWrite, FileImport, FileExport, SetSys(_LoadDir), QSys(_LoadDir)


FilePos

Syntax

rs = FilePos(rsFileNum)

Description

This function returns the current file position measured in bytes from the beginning of the file.  rsFileNum is a file number as specified in FileOpen.

See also

FileSeek, FileEOF, FileQ


FileQ

Syntax

gs = FileQ(asFileName, rsAction)

Description

This function returns information about a file.

rsAction	Function

_Exists	Returns 1 if the file exists in the first directory on the _LoadDir path, 2 if the file exists and is read-only, and 0 if the file does not exist.

_DateTime	Returns a date-time value indicating the last time the file was modified.

_Size	Returns the size of the file, in bytes.

_Name	Returns the name, including path, of the first file on the _LoadDir path matching the given file name.  If no such file is found, the first directory on the _LoadDir path is used with the filename.

_Directory	Returns 1 if asFileName is a directory, and 0 if it does not exist or is a file.

See also

SetSys(_LoadDir), QSys(_LoadDir), FileOpen


FileQUnique

Syntax

rs = FileQUnique

Description

This function generates a unique file number to use with FileOpen.

See also

FileOpen


FileRead

Syntax

FileRead(rsFileNum, ggvData [, rsCount [, rsType [, rgAlphaSize]]])

Description

This command reads data from a file into a variable.  rsFileNum is the file number for a file opened with FileOpen.

ggvData is the name of the variable in which to store the data.  rsCount is the number of bytes to read into a string or the number of elements to read into an array, depending on whether rsTypeis specified or not.

If rsType is not specified, a single string is read.  If rsCount is not specified, data is read until a carriage return.

rsType	Function

_Real	rsCount real values are read.  If rsCount is 1, the data is stored in ggvData as a scalar.  Otherwise it is an array.

_DateTime	rsCount date-time values are read.  If rsCount is 1, the data is returned as a scalar.  Otherwise it is an array.

_Alpha	rsCount strings are read and stored in ggvData as an array of strings.  If rgAlphaSize is used, it specifies the number of characters for each element of the array.  If rgAlphaSize is not used, each string is delimited by a carriage return in the file.

See also

FileWrite, FileImport, FileOpen, FileQ


FileSeek

Syntax

FileSeek(rsFileNum, rsAmount [, rsFrom])

Description

This command positions the file pointer within the specified file.  The file pointer indicates the next byte in the file that will be read or written.  rsFileNum is a file identification number of a file opened with FileOpen.  rsAmount indicates the number of bytes the file pointer should be moved, and can be positive or negative.  rsFrom indicates the position the file pointer should be moved from.  By default the file pointer is moved relative to its current location.

rsFrom	Function

_Beg	Moves the file pointer rsAmount bytes from the beginning of the file.

_Cur	Moves the file pointer rsAmount bytes from its current position.

_End	Moves the file pointer rsAmount bytes from the end of the file.

The file pointer can be moved beyond the end of the file.  It is an error to read past the end of the file, but it is not an error to write beyond the end of the file.

See also

FilePos, FileOpen, FileQ


FileWrite

Syntax

FileWrite(rsFileNum, Data [, rsCount  [, rgAlphaSize]])

Description

This command writes data to a file.  rsFileNum is the file number of a file opened with FileOpen.

The data is written according to its type.  rsCount can be used to specify the number of characters from a string that are written, or the number of elements of an array that are written.  When writing an array of strings, rgAlphaSize can be used to specify the number of characters from each string.

See also

FileOpen, FileRead, FileQ, FileClose


Form Commands

This section lists commands for creating and controlling forms.

FormControl

FormModifyObject

FormNew

FormQ

FormQNum

FormQObject

FormQStr

FormQUnique

FormSelect

FormSetColor

FormSetProc

FormSetObject

FormWait


FormControl

Syntax

FormControl(rsAction [; [rsStyleFlags,] [rsLeft, rsTop[, rsWidth, rsHeight]]])

Description

This command controls the appearance of the currently selected form.

rsAction	Function

_Close	Closes the form.

_Show	Displays the form.

_Hide	Hides the form.

_Size	Sets the size and the position of the form according to the size modifiers: rsLeft, rsTop, rsWidth and rsHeight.  These values are specified using Realizer's position notation.

_Print	Prints the form.  The size and position of the form on the page can be specified with rsLeft, rsTop, rsWidth and rsHeight using Realizer's position notation.  If the width and height are used, the form will be scaled as a bitmap.  The printer style flags can be set with rsStyleFlags.

_Minimize	Displays the form in its iconic form.

_Maximize	Displays the form filling the entire Realizer window.

_Restore	Restores a maximized or minimized form to its previous size.

rsStyleFlags	Effect

_NoHeader	Prevents a header from being printed at the top of the page.

_NoFooter	Prevents the page number from being printed at the bottom of the page.

_NoFrame	Prevents the border of the form from being printed.

See also

FormNew, FormSelect, FormQ, LFLUSH


FormModifyObject

Syntax

FormModifyObject(rsID [, rsAttrib [, asText] [, rsLeft, rsTop [, rsWidth, rsHeight]]] [; Mod1 [..., ModN]])

Description

This command modifies the appearance or the state of an item in a form.  rsID identifies the item in the current form.  rsAttrib controls how the item is affected.

rsAttrib	Function

_Close	Removes the object from the form.

_Normal	Restores the object to its normal (ungray) state.

_Gray	Grays the object.

_Clear	Clears the contents of any list box.

_SetFocus	Forces the focus to be set to the object.

_SetColor	Sets the colors of the object to the currently selected colors.

asText is used to change the text in an object.  A new position and size for the object can be specified with rsLeft, rsTop, rsWidth, and rsHeight.

Mod1 through ModN, if specified, modify the object.  These modifiers are processed after rsAttrib is processed.

See also

FormSetObject, FormQObject, FormSetColor


FormNew

Syntax

FormNew(rsFormNum [; asTitle  [, rsStyle]])

Description

This command creates a new form.  rsFormNum is the form number used to refer to the form, and should be between 1 and 32767.  If a form with that number already exists, the old one will be destroyed before the new one is created.

rsStyle controls the appearance of the form's window.  It can be the sum of any of the following flags:

rsStyle	Function

_Close	Allows the form to be closed from the form window's system menu or the Realizer File Close menu.

_Frame	Places a frame around the form window.  Cannot be used in conjunction with _Title or _Size.

_Size	Places a thick sizing frame around the form window.  If _Title is also set, a maximize icon will be placed in the title bar.

_Title	Puts a title bar at the top of the window.  Allows the window to be moved.

_Minimize	Allows the window to be minimized from the form window's system menu.  If _Title is also set, a minimize icon will be placed in the title bar.

_HotClick	Causes mouse clicks in the form to be processed even when the form is not front.  By default, a mouse click in a background window only brings that window forward.

_ContextEnter	Controls the behavior of Enter in the form.  By default, Enter is the equivalent of object number 1 in the form.  If Enter is needed in logs or multi-line text boxes, Ctrl+Enter must be used. Context Enter overrides this default in the form, allowing logs and text boxes to receive the Enter key.  If Context Enter is used, Enter no longer notifies the form as object number 1.

By default, the form's window style is _Frame + _Minimize + _Close.

When a form is created it is invisible.  FormControl can be used to make it visible.

See also

FormQUnique, FormSelect, FormControl, FormSetObject


FormQ

Syntax

rg = FormQ(rsAction [; rsFormNum])

Description

This function returns information about a form.

If no form is specified, the current form is used.  If there is no current form, or the specified form does not exist, a real scalar value of 0 is returned.

rsAction	Function

_Exists	Returns 1 if the form exists.  Otherwise it returns 0.

_Selected	Returns the identification number of the currently selected form.

_Size	Returns a four element array representing the size and position of the form in pixels.  The first element is the location of the left side of the form.  The second is the location of the top of the form.  The third is the width of the form. The fourth is the height of the form.

_Title	Returns the title of the form.

_Style	Returns the style of the window, as set by FormNew.

_HWnd	Returns the window handle of the form for use with external procedures and custom controls.

See also

FormNew, FormControl, FormSelect


FormQNum

Syntax

rs = FormQNum(rsID)

Description

This function returns the numeric value of an object in a form.

Option buttons and check boxes return 1 if they are on, and 0 if they are off.  All list boxes return the number of the currently selected item, or 0 if nothing is selected.  The return value will be -2 if rsID is invalid, and -1 for all other controls.

See also

FormQStr, FormQObject


FormQObject

Syntax

rv = FormQObject[(rsID)]

Description

This function returns an array of information about an item in a form.  If rsID is not specified, FormQObject returns the identification of the item that has focus.  If there is no focus item, 0 is returned.

If rsID is specified, the following array is returned:

Element	Description

rv[_FQO_ItemNum]	The identification number of the object.

rv[_FQO_ItemType]	The type of the item as set with FormSetObject.

rv[_FQO_Left]	The current position in pixels of the left side of the object.

rv[_FQO_Top]	The current position, in pixels, of the top of the object.

rv[_FQO_Width]	The width of the object in pixels.

rv[_FQO_Height]	The height of the object in pixels.

rv[_FQO_Style]	The style of the object (_Normal or _Gray).

rv[_FQO_Value]	The value of the object as would be returned by FormQNum.

rv[_FQO_HWnd]	The window handle of the object. (Advanced programmers can use this with EXTERNAL functions.)

If rsID is invalid, all elements except _FQO_Value will be set to 0 and _FQO_Value will be set to -2.

See also

FormQNum, FormQStr, FormSetObject


FormQStr

Syntax

ag = FormQStr(rsID [, rsStart [, rsCount]])

Description

This function returns the text value of an object in a form.

For text boxes, combo boxes, and drop down combo boxes, the returned string is the text within the edit field of the object.  For list boxes and drop down list boxes, the string returned is the selected item, if any.  For all other objects, the string returned is the object's text as set by FormSetObject or FormModifyObject.  If rsID is invalid, an empty string will be returned.

The contents of any list box can be retrieved as an array of strings by specifying rsStart and rsCount.  rsStart indicates the first item to retrieve, and if rsCount is specified, only that many items will be returned.  The valid range of the returned array will begin with rsStart.

If rsStart is not valid, the string array returned will be a single empty string with an index one greater than the actual number of elements in the list box.  This can be used to find out how many items are actually in the list box.

See also

FormQNum, FormQObject, FormSetObject, FormModifyObject


FormQUnique

Syntax

rs = FormQUnique

Description

This function generates a unique form number for use with FormNew.

See also

FormNew


FormSelect

Syntax

FormSelect(rsFormNum)

Description

This command selects the current form which will be affected by subsequent form commands.  It is an error to select a nonexistent form.

See also

FormNew, FormControl


FormSetColor

Syntax

FormSetColor(rgColor;  [rsWhich])

FormSetColor(rsRed, rsGreen, rsBlue;  [rsWhich])

Description

This command sets the colors that are used for the background of the current form, and for all objects that are subsequently placed in the form.

The color can be specified in several ways.  One of the Realizer predefined colors can be used by specifying it as rgColor.  If a specific RGB color is needed, rsRed, rsGreen, and rsBlue can be specified as values ranging from 0 to 1.  rgColor can also be a three element array with the RGB values.

rsWhich indicates whether the color is for the objects' text, the objects' background, or the background color of the form.  If rsWhich is not given, the background color of the form is set.

Changes to the object colors affect the FormSetObject and FormModifyObject commands that come after the FormSetColor.  Changes to the background color of the form occur immediately.

rsWhich	Specifies

_Background	The background color of the form.

_Text	The color of the text  in the objects.

_Field	The color of the background of the objects.

rgColor

_Black	_Evergreen	_LightYellow	_DarkGreenBlue

_White	_MediumBlue	_LimeGreen	_NavyBlue

_Gray	_Purple	_LightGreen	_DarkPurple

_Red	_Turquoise	_Maroon	_Tan

_Green	_Brown	_Pink	_GrayGreen

_Blue	_Pale	_Orange	_LightGray

_Cyan	_Cream	_LightEvergreen	_Violet

_Magenta	_GreenYellow	_DarkBrown	_BlueGreen

_Yellow	_MediumGreen	_MediumBrown

_Brick	_PowderBlue	_DarkGreen

See also

FormSetObject, FormModifyObject


FormSetProc

Syntax

FormSetProc[(procName  | asMacroName)]

Description

This command sets the procedure or macro associated with the current form.  The procedure will be called when the user interacts with an object in the form or closes the form.

The procedure being set as a form procedure must expect one parameter, called the tool procedure parameter array.

If a procedure or macro is not specified, any procedure already attached to the current form is disassociated from the form.

See also

FormWait, FormControl


FormSetObject

Syntax

FormSetObject(rsID, gsType, asText [, rsFontNum], rsLeft, rsTop [, rsWidth, rsHeight] [; [rsStyle,] Mod1 [..., ModN]])

Description

This command puts an object into the current form.  rsID is an identifier used to refer to the object being added.  If rsID already exists, the new definition replaces the old.

gsType specifies the type of the control.  asText is the text for the object.  If rsFontNum is used, the text is displayed in that font.  The position of the object within the form is specified using Realizer's position notation.  If the width and height are not specified explicitly, default values will be used.

gsType

_Button	_CaptionLeft	_ComboBox

_DefButton	_CaptionRight	_DropDownList

_OptionButton	_CaptionCenter	_DropDownCombo

_CheckBox	_Bitmap	_Chart

_GroupBox	_BitmapButton	_Sheet

_TextBox	_ListBox	_Log

_Frame	_Board

The use of rsStyle and the other modifiers depends on the type of the object.

Object	Modifier List

Option Buttons	[; [rsStyle,]  rsInitState  [, rsGroupNum]]

Check Boxes	[; [rsStyle,]  rsInitState  [, rsGroupNum]]

Text Boxes	[; rsStyle]

Captions	[; rgColor]

All list boxes	[; [rsStyle,]  [ModGroup1  [ ..., ModGroupN]]

Object	rsStyle

Option Buttons	_Notify

Check Boxes	_Notify

Text Boxes	_Notify, _MultiLine, _NoBorder

All list boxes	_Notify, _Sorted

The modifiers for all the list box types (_ListBox, _ComboBox, _DropDownList, and _DropDownCombo) come in groups.  Any number of different groups can be specified.

Modifier group	rsFlags

_ListFiles, rsFlags, asFilter	_NormFiles, _Drives, _SubDirs, _NoFiles

_ListVars, rsFlags	_Alpha, _Real, _DateTime, _Scalar, _Array

_ListFams

_ListFonts

_ListFontSizes, asFontName

asText

For custom controls, gsType is a string containing the name of the custom control's window class.  The DLL containing the custom control must have been declared with the EXTERNAL CUSTOMCONTROLS command.

See also

FormModifyObject, FormQObject, EXTERNAL


FormWait

Syntax

rs = FormWait [(rsPickMode)]

Description

This function displays the current form, and then waits until the user clicks on an item in the form, presses enter, or presses escape.

If the user hit enter, the return value is 1.  If the user hit escape, the return value is 2.  Otherwise, the return value is the identification number of the item that was clicked.

rsPickMode can be one of the following.  The default is _Normal.

rsPickMode	Function

_Normal	Waits until an object notifies the form, as described in Chapter 19.

_Pick	Waits until the user selects any non-gray object by clicking on it and then returns the identification of that object.

_PickDrag	Allows the user to pick and then drag any non-grayed object, and then returns the identification of that object.

_Peek	If used after a form procedure was notified by a text box, returns the identification of the actual item that caused the text box to lose focus, or 0 if that item does not notify the form.

See also

FormSetProc


General Commands

This section lists general commands.

BEEP

CLEAR

EndValid

EXECUTE

EXPORT

EXTERNAL

FUNC

FUNCTION

IDLE

LOCAL

Pointer

PROC

QFormat

QNOptMods

QNOptParams

QOptMod

QOptParam

QSys

QVar

RANDOMIZE

RESET

RUN

SetFormat

SetSys

StartValid

STOP

SUB


BEEP

Syntax

BEEP

Description

This command causes a tone to sound.

See also

INPUT


CLEAR

Syntax

CLEAR Symbol1 [..., SymbolN]

Description

This command clears variables, procedures, and functions.  All the data and storage space associated with the symbol is freed.

See also

RESET


STOP

Syntax

STOP

Description

This command stops the currently running program.

See also

RESET


EndValid

Syntax

rs = EndValid(Data)

Description

This function returns the index of the last valid element in an array.  The result is 0 for scalars and undefined variables.

See also

StartValid


EXECUTE

Syntax

EXECUTE asStatement

Description

This command executes Realizer statements stored in a string.  It is a very powerful command since it allows a program to dynamically create new program statements.


EXPORT

Syntax

EXPORT Symbol1 ..., SymbolN

Description

This command allows variables, procedures, and functions created by an encrypted program to be seen and used by other Realizer applications.  It also allows an encrypted application to use variables, procedures, and functions from the normal Realizer environment.  Symbol1 through SymbolN are a list of variables, procedures, and functions to export.

This command has no effect when executed from the normal environment.


EXTERNAL

Syntax

EXTERNAL asLibname PROC procName [(type1 [name1] [..., typeN  [nameN]])] [ALIAS gsAliasName]

EXTERNAL asLibname SUB procName [(type1 [name1] [..., typeN  [nameN]])] [ALIAS gsAliasName]

EXTERNAL asLibname FUNC funcName [(type1 [name1] [..., typeN  [nameN]])] AS returnType [ALIAS gsAliasName]

EXTERNAL asLibname FUNCTION funcName [(type1 [name1] [..., typeN  [nameN]])] AS returnType [ALIAS gsAliasName]

EXTERNAL asLibname CUSTOMCONTROLS

Description

This command declares external procedures and functions found in a dynamic link library.  Once these procedures and functions are declared, they may be invoked by a Realizer program.  EXTERNAL is also used to declare DLLs containing custom controls.

asLibName is the name of the dynamic link library containing the procedure, function or custom control.  procName or funcName is the name of the procedure or function as it will be used by Realizer.  If the actual name of the function within the DLL is different, it should be specified as gsAliasName with the ALIAS option.

The parameters for a procedure or function should be listed with their types.  The actual name of the paramter is optional and ignored.

Type	Description

REAL	8 byte IEEE floating point value.

LONG	4 byte signed integer.

DWORD	4 byte unsigned integer.

INTEGER	2 byte signed integer.

WORD	2 byte unsigned integer.

CHAR	1 byte signed integer.

BYTE	1 byte unsigned integer.

STRUCTURE rsNBytes	rsNBytes are copied to the stack without conversion.  The external function must be expecting the correct number of bytes.

POINTER	The address of the parameter is passed as a far pointer.

External functions must specify a return type, which can be any of the listed types except POINTER.  Structure types are returned in a string.  All the other types are returned as a real value.

PROC and SUB are synonyms and can be used interchangeably.  FUNC and FUNCTION are synonyms and can be used interchangeably.

See also

Pointer, FormSetObject


IDLE

Syntax

IDLE rsSeconds

Description

This command causes the Realizer program to pause for about rsSeconds seconds.  The Realizer program is still running, but Realizer will be more receptive to other Windows applications running simultaneously, such as a program launched with the SHELL command.

The delay is not precise.  The margin of error is about +/- 1 second.

See also

SHELL, FOR


FUNC

FUNCTION

Syntax

FUNC funcName [([Var1 [..., VarN] [,]] [..] [; [Mod1 [..., ModN] [,]] [..] ])]

statements

END FUNC

FUNCTION funcName [([Var1 [..., VarN] [,]] [..] [; [Mod1 [..., ModN] [,]] [..] ])]

statements

END FUNCTION

Description

This statement is used to declare a function.  Parameters are specified within parentheses as Var1 through VarN.  Modifiers, if any, are listed as Mod1 through ModN.  If optional parameters or modifiers are allowed, two dots should be placed at the end of the respective list.

All functions should have a RETURN statement within them that returns the value of the function.

FUNC and FUNCTION are synonyms and can be used interchangeably.

See also

RETURN, PROC, QNOptParams, QOptParam, QNOptMods, QOptMod, EXTERNAL


QVar

Syntax

gs = QVar(ggData [, rsQuery])

Description

This command returns information about the variable or expression ggData.  rsQuery is the sum of any of the following.  By default, rsQuery is _Defined.

rsQuery	Function

_Defined	Returns 1 if the variable is defined, 0 if not.

_Alpha	Returns 1 if the variable is a string scalar or a string array, 0 if  not.

_Real	Returns 1 if the variable is a real scalar or a real array, 0 if  not.

_DateTime	Returns 1 if the variable is a date-time scalar or a date-time array, 0 if not.

_Array	Returns 1 if the variable is an array, 0 if not.

_Scalar	Returns 1 if the variable is a scalar, 0 if not.

_Name	Returns a string representing the name of the variable.  If the variable is a parameter to a procedure or function and the parameter was passed by reference, the name of the original variable is returned.  Cannot be used with any other flags.

See also

QFormat, QSys


LOCAL

Syntax

LOCAL ggvData1 [... , ggvDataN]

Description

This statement defines a set of local variables for the current procedure, function, or macro.  The variables can be used by the current procedure or any procedure it calls.  When the procedure finishes, the local variables are destroyed.

If a local variable has the same name as a previously defined variable, the local variable will be active until the procedure exits.  The previous version of the variable will be untouched.


Pointer

Syntax

rs = Pointer(rsPointer)

Description

This function returns a pointer value to be used as a parameter for EXTERNAL functions and procedures.

When Pointer(rsPointer) is passed as a parameter to an EXTERNAL procedure, the actual value rsPointer is passed.  If rsPointer were passed to the EXTERNAL procedure by itself, a pointer to a Realizer variable with the value rsPointer would be passed instead.

See also

EXTERNAL


PROC

SUB

Syntax

PROC ProcName [([Var1 [..., VarN  ] [,]] [..] [; [ Mod1 [..., ModN] [,]] [..]])]

statements

END PROC

SUB ProcName [([Var1 [..., VarN  ] [,]] [..] [; [ Mod1 [..., ModN] [,]] [..]])]

statements

END SUB

Description

This statement is used to declare a procedure.  Parameters are specified within parentheses as Var1 through VarN.  Modifiers, if any, are listed as Mod1 through ModN.  If optional parameters or modifiers are allowed, two dots should be placed at the end of the respective list.

PROC and SUB are synonyms and can be used interchangeably.

See also

EXIT, FUNC, QNOptParams, QOptParam, QNOptMods, QOptMod, EXTERNAL


QFormat

Syntax

as = QFormat(vVar)

Description

This function returns the default format string used to print a variable.

See also

SetFormat, QSys(_RealFormat), QSys(_AlphaFormat), QSys(_DateFormat)


QOptMod

Syntax

gg = QOptMod(rsModNum)

QOptMod(rsModNum) = gg

Description

This command returns the rsModNumth optional modifier passed to a procedure, function or macro.  rsModNum must be between 1 and the number of optional modifiers, as returned by QNOptMods.

QOptMod can be treated as an alias for the modifier.  If it is an array, it can be indexed.  If it is a family, it can be used with the dot operator to access or create a family member.  It can also be used on the left side of an expression to assign a value to a variable passed as an optional modifier

See also

QNOptMods, QOptParam, QNOptParams, PROC, FUNC, QVar


QNOptMods

Syntax

rs = QNOptMods

Description

This function returns the number of optional modifiers passed to a procedure, function or macro.  This count does not include the required modifiers.

See also

QOptMod, QNOptParams, QOptParam, PROC, FUNC


QNOptParams

Syntax

rs = QNOptParams

Description

This function returns the number of optional parameters passed to a procedure, function or macro.  This count does not include the required parameters.

See also

QOptParam, QNOptMods, QOptMod, PROC, FUNC


QOptParam

Syntax

gg = QOptParam(rsParamNum)

QOptParam(rsParamNum) = gg

Description

This command returns the rsParamNumth optional parameter passed to a procedure, function or macro.  rsParamNum must be between 1 and the number of optional parameters, as returned by QNOptParams.

QOptParam can be treated as an alias for the parameter.  If it is an array, it can be indexed.  If it is a family, it can be used with the dot operator to access or create a family member.   QOptParam can also be used on the left side of an expression to assign a value to a variable passed as an optional parameter

See also

QNOptMods, QOptParam, QNOptParams, PROC, FUNC, QVar


QSys

Syntax

gg = QSys(rsWhich[; rgColor])

Description

This command returns the value of a system variable.  rsWhich determines which system value will be returned and can be any of the constants listed below:

rsWhich	Return Value

_LoadDir	A string containing a set of paths separated by semicolons.  These paths are searched when files are opened or bitmaps are loaded in a form.

_MacroDir	A string containing a set of paths separated by semicolons.  These paths are searched when macros are RUN or external DLLs are loaded.

_ProgDir	A string indicating the directory of the Realizer file that is running.  Within a procedure or function, this is the directory containing the file that defined the procedure or function.

_Version	A string containing the Realizer version number.

_OutputWidth	A real scalar indicating the maximum size, in characters, of an output line in a log.  Lines that are longer will be wrapped to the next line.

_ErrorLog	A two element array containing the identification numbers of the log into which error messages are written.  The first element is the number of the log.  The second element is the number of the form containing the log, or 0 if the log is not within a form.

_PrintLog	A two element array containing the identification numbers of the log into which printed output is written.  The first element is the number of the log.  The second element is the number of the form containing the log, or 0 if the log is not within a form.

_CenturySplit	A real scalar that indicates which dates are for the 20th century and which are for the 21st century.   Any years entered as a two digit number that are larger than this value are considered to be part of the 20th century.  Any years smaller than this value are considered to be part of the 21st century.  For example, if _CenturySplit is 52, then 1/1/52 is the same as 1/1/1952, while 1/1/51 is the same as 1/1/2051.

_Separator	A string containing the character used by FileImport and FileExport to separate columns.

_CaseSensitive	A real scalar that indicates whether lowercase and uppercase letters should be treated the same in string comparisons.  A value of 1 indicates that uppercase and lowercase are distinct.  A value of 0 indicates they are treated the as the same.

_Size	Returns a real array representing the size of the Realizer window.  If the window is minimized or maximized the array will have 1 element, either _Minimize or _Maximize.  Otherwise the array will have four elements representing the position and size of the Realizer window (left, top, width and height) in pixels.

_DateFormat	A string containing the default format string for date-time values.

_AlphaFormat	A string containing the default format string for string values.

_RealFormat	A string containing the default format string for real values.

_FPError	A real scalar that indicates what Realizer does when a floating point error occurs.  If it is non-zero the program will stop and an error will be displayed.  If it is zero an appropriate value will be used for the invalid number.

_Color	Returns a three element vector representing the RGB values for rgColor.  rgColor can be one of the Realizer color constants.  It can also be a vector of three RGB values or three individual RGB values, in which case the RGB vector returned is closest matching RGB values that the system monitor will display.  All RGB values are real values from 0 to 1.

_HWnd	The Windows handle for the Realizer window.  This handle can be used with external procedures and functions.

See also

SetSys, SetFormat


RANDOMIZE

Syntax

RANDOMIZE rsSeed

Description

This command reseeds the random number generator.

See also

Rnd


RESET

Syntax

RESET  [rsWhich]

Description

This command resets part or all of the Realizer system.  rsWhich is a sum of any of the following.  By default rsWhich is _All.

rsWhich	Function

_Var	Clears all variables.

_Proc	Clears all external and internal procedures and functions.

_File	Closes all open files.

_SysVar	Resets system variables to their defaults.

_Board	Closes all boards.

_Chart	Closes all charts.

_Sheet	Closes all sheets.

_Sched	Closes the Scheduler.

_Log	Closes all logs.

_Form	Closes all forms.

_Menu	Removes all user menus and restores Realizer's menus.

_DDE	Closes all DDE sessions.

_Font	Closes all fonts.

_All	All of the above.

See also

STOP


RUN

Syntax

RUN asFileName[([param1 [, ... paramN]] [; mod1  [, ... modN]])]

Description

This command executes the commands in the macro file asFileName.

If a file extension is not specified, .RLZ is assumed.  If a path and drive are not specified, the file is searched for in the directories in the _MacroDir path list.  Parameters and modifiers can be passed to the macro by listing them in parentheses after the file name.

See also

PROC, FUNC


SetFormat

Syntax

SetFormat(ggvVar [, asFormat])

Description

This command sets the default formatting string that is used when a variable is displayed, as with the PRINT command, a spreadsheet column, or in a board.  asFormat is a format string appropriate for the variable's type.

If asFormat is omitted, the format string for ggvVar will revert to the default for its type.

See also

QFormat, SetSys(_AlphaFormat), SetSys(_RealFormat), SetSys(_DateFormat), Formats


SetSys

Syntax

SetSys(rsWhich, ggValue1  [, ... rsValue2])

SetSys(_Size, rvSizeVals)

Description

This command sets the value of a system variable.  rsWhich indicates which system variable will be set and can be any of the following constants:

rsWhich	Description

_LoadDir	A string containing a set of paths separated by semicolons.  These paths are searched when files are opened or bitmaps are loaded in a form.

_MacroDir	A string containing a set of paths separated by semicolons.  These paths are searched when macros are RUN or external DLLs are loaded.

_OutputWidth	A real scalar indicating the maximum size, in characters, of an output line in a log.  Lines that are longer will be wrapped to the next line.

_ErrorLog	The identification number of the log into which error messages are written.  ggValue1 is the number of the log.  If the log is within a form, rsValue2 is the identification number of the form.  The two values can also be expressed as a single array.

_PrintLog	The identification number of the log into which printed output is sent.  ggValue1 is the number of the log.  If the log is within a form, rsValue2 is the identification number of the form.   The two values can also be expressed as a single array.

_CenturySplit	A real scalar that indicates which dates are for the 20th century and which are for the 21st century.   Any years entered as a two digit number that are larger than this value are considered to be part of the 20th century.  Any years smaller than this value are considered to be part of the 21st century.  For example, if _CenturySplit is 52, then 1/1/52 is the same as 1/1/1952, while 1/1/51 is the same as 1/1/2051.

_Separator	A string containing the character used by FileImport and FileExport to separate columns.

_CaseSensitive	A real scalar that indicates whether lowercase and uppercase letters should be treated the same in string comparisons.  A value of 1 indicates that uppercase and lowercase are distinct.  A value of 0 indicates they are treated the as the same.

_AlphaFormat	A string containing the default format string for string values.

_RealFormat	A string containing the default format string for real values.

_FPError	A real scalar that indicates what Realizer does when a floating point error occurs.  If it is non-zero the program will stop and an error will be displayed.  If it is zero then an appropriate value will be used for the invalid number.

_Size	Sets the position and the size of the Realizer window.   rvSizeVals can be a 1 element array set to _Minimize, _Maximize or _Restore, a 2 element array indicating the left and top position of the window or a 4 element array indicating the left, top, width and height values.  All the values can be specified using Realizer's position notation.

See also

QSys, SetFormat


StartValid

Syntax

rs = StartValid(Data)

Description

This function returns the index of the first valid element in an array.  The result is 0 for scalars and undefined variables.

See also

EndValid


Input/Output Commands

This section lists the input and output commands.

INPUT

LFLUSH

LPRINT

LROWPRINT

PRINT

ROWPRINT


INPUT

Syntax

INPUT [asPrompt  [, asTitle] ; ] [ggvData1 [..., ggvDataN]]

Description

This command prompts the user for input.  A dialog box will appear on the screen with an entry field and text indicating the number of values that are required. The user is expected to type in the values separated by commas.

If specified, asPrompt will override the default prompt indicating the number of required data values. asTitle can be used to override the default title, "Realizer Input".

The type of ggvData1 through ggvDataN will be determined by the input.  Text input causes the corresponding variable to become a string, while numeric input causes the variable to become a real scalar.  Double quotes can be used to force the input to be treated as a string, and allows commas to appear in the string.  Scientific notation can also be used for numbers.

If the ggvVar parameters are omitted, INPUT creates a warning box and waits until the user presses Enter or clicks on the Ok button.

See also

PRINT, BEEP


LFLUSH

Syntax

LFLUSH

Description

This command causes any output in the print buffer to be sent to the printer.  The output from LPRINT, LROWPRINT and the print commands for the tools (e.g. ChartControl(_Print)) is always held in the print buffer.  LFLUSH is not needed when printing from the Realizer File menu.

If there is nothing to be printed, this command does nothing.

See also

LPRINT, LROWPRINT, ChartControl, SheetControl, etc.


LPRINT

Syntax

LPRINT  [USING asFormat ;] [Data1 [, | ;] [... DataN [, | ;]]]

Description

This command prints text to the printer.  It works the same as the PRINT command.  The text is collected in a spooler, or buffer, and is not actually sent to the printer until the LFLUSH command is used.

The text is printed using the current Print Log font.  Different fonts cannot be mixed on a single line.

See also

PRINT, LFLUSH, LROWPRINT, LogSelect, LogControl, Formats


LROWPRINT

Syntax

LROWPRINT  [USING asFormat ;] [Data1 [, | ;] [... DataN [, | ;]]]

Description

This command prints data to the printer in rows like the ROWPRINT command.  The text is collected in a spooler, or buffer, and is not actually sent to the printer until the LFLUSH command is used.

The text is printed using the current Print Log font.  Different fonts cannot be mixed on a single line.

See also

ROWPRINT, PRINT, LPRINT, LFLUSH, Formats


PRINT

Syntax

PRINT  [# rsLogNum  [, rsFormNum] ;] [USING asFormat ;] [Data1 [,|;] [..., DataN [,|;]]]

Description

This command prints data to a log.  If rsLogNum is not specified, the output is sent to the Print Log.  If the output is being sent to a log in a form, rsFormNum should be specified. along with rsLogNum.

Any number of expressions can be printed at one time.  If two items are separated with a semi-colon, no extra spaces are printed between the items.  If a comma is used, a tab will be printed between the items.

By default, a carriage return is printed after the data.  If the data list ends with a semi-colon or a comma, the carriage return is suppressed and the next PRINT to that log will begin its output on the same line.

Variables are printed according to their type and default format.  The USING option allows specific formats to be used instead.  asFormat is composed of normal text and formatting commands.

See also

PRINT, ROWPRINT, SetFormat, Formats


ROWPRINT

Syntax

ROWPRINT  [# rsLogNum  [, rsFormNum] ;] [USING asFormat ;] [Data1 [,|;] [..., DataN [,|;]]]

Description

This command prints data to a log as rows.  If rsLogNum is not specified, the output is sent to the Print Log.  If the output is being sent to a log in a form, rsFormNum should be specified along with rsLogNum.

The ROWPRINT command is similar to PRINT, except that all array elements are printed on the same line instead of each element appearing on a different line.

See also

PRINT, LROWPRINT, Formats


Log Commands

This section lists the log commands.

LogControl

LogNew

LogQ

LogQSize

LogQStr

LogQUnique

LogSelect

LogSetProc


LogControl

Syntax

LogControl(rsAction [; [rsStyleFlags,]  [rsLeft, rsTop [, rsWidth, rsHeight]]])

Description

This command controls the appearance of the currently selected log.

rsAction	Function

_Close	Closes the log.

_Show	Displays the log.

_Hide	Hides the log.

_Size	Sets the size and the position of the log, according to the size modifiers: rsLeft, rsTop, rsWidth and rsHeight.  These values are specified using Realizer's position notation.

_Print	Prints the log.  The size and position of the log on the page can be specified with rsLeft, rsTop, rsWidth and rsHeight using Realizer's position notation.  The printer style flags can be set with rsStyleFlags.

_Minimize	Displays the log in its iconic form.

_Maximize	Displays the log filling the entire Realizer window.

_Restore	Restores a maximized or minimized log to its previous size.

_SetFont	Sets the font that is used for the text in the log.  rsLeft is the font identification number, or 0 for the system font.

_SetTabs	Sets the distance between tab stops.  rsLeft is the distance, specified with Realizer's position notation.

rsStyleFlags	Function

_NoHeader	Prevents a header from being printed at the top of the page.

_NoFooter	Prevents the page number from being printed at the top of the page.

See also

LogNew, LogSelect, LogQ, LFLUSH, PRINT


LogNew

Syntax

LogNew(rsLogNum [; asTitle  [, rsStyle]])

Description

This command creates a new log.  rsLogNum is the log number used to refer to the log, and should be between 1 and 32767.  If a log with that number already exists, the old one will be destroyed before the new one is created.

The title for the log window can be specified with asTitle.  By default the title is "Log rsLogNum".  rsStyle controls the appearance of the window.  It can be the sum of any of the following flags:

rsStyle	Function

_Close	Allows the log to be closed from the log window's system menu or the Realizer File Close menu.

_Frame	Places a frame around the log window.  Cannot be used in conjunction with _Title or _Size.

_Size	Places a thick sizing frame around the log window.  If _Title is also set, a maximize icon will be placed in the title bar.

_Title	Puts a title bar at the top of the window thus making the window moveable.

_Minimize	Allows the window to be minimized from the log window's system menu.  If _Title is also set, a minimize icon will be placed in the title bar.

_HotClick	Causes mouse clicks in the log to be processed even when the log is not frontmost.  By default, a mouse click in a background window only brings that window forward.

By default, the log's window style is _Title + _Size + _Minimize + _Close.

When a log is created it is invisible.  LogControl can be used to make it visible.

See also

LogQUnique, LogSelect, LogControl, PRINT


LogQ

Syntax

rg = LogQ(rsAction  [; rsLogNum [, rsFormNum]])

Description

This function returns information about a log.  rsLogNum is the number of the log.  If the log is in a form, rsFormNum should also be specified.

If a log is not specified, the currently selected log is used.  If there is no current log, or if the specified log does not exist, a real scalar value of 0 is returned.

rsAction	Function

_Exists	Returns 1 if the log exists.  Otherwise it returns 0.

_Selected	Returns a two element array containing the number of the currently selected log.  The first element contains the log number.  If the log is in a form, the second element contains the form number.  Otherwise the second element is zero.

_Size	Returns a four element array representing the size and position of the log in pixels.  The first element is the location of the left side of the log.  The second is the location of the top of the log.  The third is the width of the log. The fourth is the height of the log.

_Title	Returns the title of the window.

_Style	Returns the style of the window, as set by LogNew.

_HWnd	Returns the window handle of the log for use with external procedures and custom controls.

See also

LogQSize, LogQStr, LogNew, LogControl, LogSelect


LogQSize

Syntax

rs = LogQSize

Description

This function returns the number of characters in the current log.

See also

LogQStr, LogQ


LogQStr

Syntax

as = LogQStr [(rsStart [, rsLen])]

Description

This function returns the text in the current log.  By default, all the text is returned.  If rsStart is specified, it is the first character retrieved from the log. rsLen specifies the maximum number of characters to retrieve.

See also

LogQSize, LogQ


LogQUnique

Syntax

rs = LogQUnique

Description

This function generates a unique log number for use with LogNew.

See also

LogNew


LogSelect

Syntax

LogSelect(rsLogNum  [, rsFormNum])

Description

This command selects the current log to be affected by subsequent log commands.

rsLogNum is the identification number of the log.  If the log is in a form, rsFormNum should also be specified.  It is an error to select a log that does not exist.

rsLogNum can be _PrintLog or _ErrorLog to select the Print Log or the Error Log.

See also

LogNew, LogControl, LogQ


LogSetProc

Syntax

LogSetProc[(procName  | asMacroName)]

Description

This command sets a procedure or macro for the current log to invoke when it is closed.  The procedure being set as the log procedure must expect one parameter, called the tool procedure parameter array.

If a procedure or macro name is not specified, any procedure currently attached to the log is disassociated from the log.


Font Commands

This section lists the font commands.

FontControl

FontNew

FontQ

FontQUnique

FontSelect


FontControl

Syntax

FontControl(rsAction)

Description

This command is used to undefine the current font.  rsAction can only be set to _Close.

See also

FontSelect, FontNew, FontQ


FontNew

Syntax

FontNew(rsFontNum; asFace, rsSize [, rsStyle])

FontNew(rsFontNum; avFontDesc)

Description

This command creates a new font definition.  rsFontNum is a font number that will be used to refer to the font.  It should be between 1 and 32767.  If rsFontNum already exists, the old font will be undefined and replaced with the new font.

asFace specifies the face name for the font (i.e. "Helv", "Tms Rmn" or "Courier").  rsSize specifies the size of the font in points.  rsStyle controls the font’s appearance.  It can be the sum of any of the following flags:

rsStyle	Effect

_Bold	A bold font.

_Italics	An italic font.

_Underline	An underlined font.

_Strikeout	A strikeout font.

An alpha array, avFontDesc, can be used instead of the individual parameters to define the font.  The first element of the array contains the face name, the second the size, and the third, the style.  This is typically used in conjunction with StdFont, which returns such an array.

If rsSize is a positive number, Realizer will find the closest matching font.  If rsSize is a negative number, Realizer will attempt to create a font with a closer size match by stretching an existing font.

See also

FontQUnique, FontControl, FontSelect, FontQ, StdFont


FontQ

Syntax

gs = FontQ(rsAction [; rsFontNum])

Description

This function returns information about a font.  If no font is specified, the currently selected font is used.

rsAction	Function

_Exists	Returns 1 if the font exists, 0 if otherwise.

_Selected	Returns the number of the currently selected font.  Returns 0 if no font is selected.

_Size	Returns the size of the font in points.

_Style	Returns the style flags of the font as specified with FontNew.

_Title	Returns the face name of the font.

See also

FontSelect, FontNew


FontQUnique

Syntax

rs = FontQUnique

Description

This function generates a unique font number to use with FontNew.

See also

FontNew


FontSelect

Syntax

FontSelect(rsFontNum)

Description

This command selects the current font which will be affected by subsequent font commands.  rsFontNum is the font number of the new current font.

See also

FontNew, FontControl


Keyboard Shortcuts

The following can be used as shortcuts to menu commands:

Command	Key

Getting Help	F1

Closing Realizer	Alt+F4

Closing a window	Ctrl+F4

Creating a new program window	Ctrl+N

Opening a file	Ctrl+O

Executing a file	Ctrl+X

Undoing the last edit	Alt+Backspace

Cutting to the clipboard	Shift+Delete

Copying to the clipboard	Ctrl+Insert

Pasting from the clipboard	Shift+Insert

Clearing the selection	Delete

Clearing a text or program window	Ctrl+Shift+Delete

Going to a specific line	Ctrl+W

Finding text	Ctrl+F

Repeating a find	Ctrl+A

Replacing text	Ctrl+R

Showing the Print Log	Ctrl+P

Showing the debugging tools	Ctrl+D

Stopping a program	Ctrl+C, Ctrl+Break

Running a program	Ctrl+G

Continuing a program	Ctrl+G

Resetting a program	Ctrl+E

Running current line or selection	Ctrl+Z

Single stepping	Ctrl+S

Tracing into line	Ctrl+T

Skipping a line	Ctrl+K

Tracing out of a procedure	Ctrl+U

Showing call tree	Ctrl+L

Showing variable display	Ctrl+V

Turning on Full Stop	Ctrl+Shift+C, Ctrl+Shift+Break

Encrypting a program	Alt+F1

Resetting everything	Ctrl+Alt+F2

Bringing next window forward	Ctrl+F6

Moving a child window	Ctrl+F7

Sizing a child window	Ctrl+F8

Minimizing a child window	Ctrl+F9

Maximizing a child window	Ctrl+F10


Menu Commands

File Menu

Edit Menu

Run Menu

Window Menu

Help Menu


File Menu

New

Creates a new program window.

Open

Loads a program or file from disk, displaying it in a program window.  It will bring up a dialog box from which the file to open is selected.

Close

Closes the front most window.  If the window is a program window that has been modified, a dialog box will appear asking if the changes should be saved.

Save

Saves the topmost window if it is a program window or text log.  If the window does not have a name, the Save As dialog box will appear.

Save As

Saves the topmost window if it is a program window or log.  A dialog will appear asking for the file name.

Execute

Runs a Realizer program from disk.  It will bring up a dialog box from which the program to run is selected.

Print

Prints the topmost window.

Printer Setup

Selects and configures printers.

Exit

Closes Realizer.  If there are any modified program windows, Realizer will ask if they should be saved.


Edit Menu

Undo

Undoes the last change made to a program window, log, edit control or spreadsheet.

Cut

Removes the selected text and copies it to the clipboard.

Copy

Copies the selected text to the clipboard.

Paste

Copies text from the clipboard into a  window.

Clear Selection

Deletes the selected text without copying it to the clipboard.

Clear All

This deletes all text in a program window or log.  The text will not be copied to the clipboard.

Copy Window

Copies the topmost window to the clipboard as a bitmap.  Used for copying screen images to other applications.

Where

Displays a dialog showing the current line number.  Changing the number moves to a different line.

Find

Searches for text.  The whole file, the current selection, or all text after the insertion point can be searched.  The search can be case sensitive or case insensitive and can match whole words or partial words.

Find Again

Searches for the next occurrence of the last word searched for.

Replace

Finds and replaces text.  The whole file, the current selection, or all text after the insertion point can be searched.  The search can be case sensitive or case insensitive and can match whole words or partial words.  Either the next occurrence or all occurrences of the text will be replaced.  If all occurrences are replaced, each change can be confirmed.


Run Menu

Go

Runs the program in the topmost program window.  If the program has been stopped, then this command continues running it where it left off.  Otherwise, it runs it starting at the first line in the program.

Reset Program

Resets the program so that subsequent Go's will run from the beginning of a program.  Use this command after you have stopped a program and want to rerun it, rather than continue where it left off.

Instant

Runs the selected set of lines.  If no lines are selected, the line containing the insertion bar is run.

Full Stop

Prevents external actions, such as DDE, and user actions, such as clicking on a menu or tool, from activating Realizer procedures.  Used while debugging.

Step

Runs a single line from a program.  If the debugging tools are showing, then the line that is about to run will appear in the history box.   If the line invokes procedures, functions, or macros, they will be executed in full.  That is, Realizer will not stop at the first line in a called procedure, function, or macro.

Trace In

Runs a single line from a program.  If the debugging tools are showing, then the line that is about to run will appear in the history box.   Realizer will stop at the first line in any invoked procedures, functions, or macros.

Skip

Skips the next line in a program.  If the debugging tools are showing, the line will be italicized in the history box and the next line from the program will appear.

Trace Out

Exits from a procedure, function, or macro entered with Trace In.  All commands up to the line after that Traced Into will be executed without stopping.

Show Call Tree

Displays the call tree.  The top line indicates what line is about to execute; subsequent lines indicate routines that were entered in order to get to that line.  Double clicking on a line in the Call Tree, or selecting a line and hitting Goto file, will bring up the file containing that line and scroll to the line.

Show Variables

Displays all variables used by the system.  By default all variables, procedures, and functions are shown, listed alphabetically.  Procedures and functions will show how many parameters and modifiers they take.  Scalars will show their values, while vectors will show their valid range, type, and size.  Local variables, procedures, and functions will be followed by a level indicator.  The deeper a variable is nested in calls, the higher its level number.  Procedure and function parameters that are passed by reference will indicate the name of the variable being passed.

You can choose to list only variables or only procedures and functions.  You can list all variables, global variables, or local variables of any level via the Level combo box.  You can list variables whose name matches a particular pattern by typing a pattern into the Filter box.  This pattern can include * and ? wildcards.  Click on the List button when you want to refresh the screen for the new parameters.

Double clicking on an array will show the first 100 elements in the array.


Window Menu

Tile

Tiles all windows on the screen.  Tiled windows do not overlap.

Cascade

Arranges all windows such that each starts slightly below and to the right of the previous.

Arrange Icons

Arranges all icons of minimized windows without changing the position of non-iconic windows.

Show (Hide) Directories

Causes program window titles to show either the full path name or only the file name of the file they contain.

Show (Hide) Debugger

Shows or hides the debugging tools.

Show Print Log

Displays the Print Log.

Show Error Log

Displays the Error Log.

Show Scheduler

Displays the Scheduler.

Numbered Windows

This is a list of all windows currently displayed.  Selecting a window brings that window to the front.

More Windows

Displays a list of all windows.   When more than 10 windows are displayed on the screen, this command appears after the ninth window in the Window menu list.


Help Menu

Index

Displays a hierarchical index of all topics in the Realizer help file.

Keyboard

Displays the keyboard shortcuts for Realizer commands.

Language

Displays an index to Realizer's language statements.

Commands

Displays an index to the commands in Realizer's menus.

Procedures

Displays an index to help on performing elementary operations in Realizer.

Using Help

Displays information on how to use Realizer's help system.

About Realizer

Shows the Realizer version number and additional information.


Math Commands

This section lists the math commands.

Abs

And

ACos

ASin

ATan2

ATn

Bool

Ceil

Cos

Eqv

Exp

Exp10

Floor

IF

Imp

Index

Log

Log10

Mask

Max

Min

Mod

Not

Or

Product

Rnd

Round

RunTot

Sgn

Sin

Sqr

Sqrt

Sum

Tan

VectSet

Xor

ZeroFill

*

^

\

+

-

/

<

<=

>

>=

<>

=


Abs

Syntax

rg = Abs(rgData)

Description

This function computes the absolute value of rgData, its magnitude without its sign.  If rgData is negative, the absolute value is -rgData.  Otherwise, the absolute value is just rgData.

See Also

Sgn


And

Syntax

rg = rgData1 And rgData2

Description

This operator returns the logical AND of two values.  The result is 1 if both rgData1 and rgData2 are non-zero.  Otherwise, the result is 0.

The truth table for And is:

F	T

F	0	0

T	0	1

See also

Or, Xor, Eqv, Not, Imp


ACos

Syntax

rg = ACos(rgData )

Description

This function returns the arc cosine of rgData, the angle whose cosine is rgData.  rgData must be between -1 and 1.  The result will be in radians, and is always between 0 and pi.

 See also

Cos


ASin

Syntax

rg = ASin(rgData)

Description

This function returns the arc sine of rgData, the angle whose sine is rgData.  rgData must be between -1 and 1.  The result will be in radians, and is always between -pi/2 and pi/2.

See also

Sin


ATn

Syntax

rg = ATn(rgData)

Description

This function returns the arc tangent of rgData, the angle whose tangent is rgData.  The result will be in radians, and is always between -pi/2 and pi/2.

See also

Tan, ATan2


ATan2

Syntax

rg = ATan2(rgX, rgY)

Description

This function returns the angle formed between the origin and the point (rgX, rgY).  The result will be in radians and is always between -pi and pi.

This command differs from ATn in that it preserves the quadrant of the angle, and can be passed points for angles where the tangent is infinity.

See also

ATn, Tan


Bool

Syntax

rg = Bool(rgData)

Description

This function converts a real number to a Boolean value.  If the rgData is non-zero, the result is 1.  Otherwise, the result is 0.

See also

Sgn, StatSwitch


Ceil

Syntax

rg = Ceil(rgData)

Description

This function returns the ceiling value of rgData.  The ceiling is the minimum integral number greater than or equal to the number.

See also

Floor, Round


Cos

Syntax

rg = Cos(rgData)

Description

This function computes the cosine of rgData.  rgData is specified in radians.

See also

ACos, Sin, Tan


Eqv

Syntax

rg = rgData1 Eqv rgData2

Description

This operator returns the logical equivalence of two numbers.  The result is 1 if both rgData1 and rgData2 are zero, or if both rgData1 and rgData2 are non-zero.

Eqv is the same as Not Xor.

The truth table for Eqv is:

F	T

F	1	0

T	0	1

See also

Xor, And, Or, Not, Imp


Exp

Syntax

rg = Exp(rgData)

Description

This function returns e^rgData .

See also

Exp10, Log


Exp10

Syntax

rg = Exp10(rgData)

Description

This function computes 10^rgData.

See also

Log10, Exp


Floor

Syntax

rg = Floor(rgData)

Description

This function returns the floor value of rgData.  The floor value is the maximum integral number less than or equal to the number.

See also

Ceil, Round


IF

Syntax

gg = IF rgTest THEN Data1 ELSE Data2

Description

When used as a function, the returned value is Data1 if rgTest is non-zero and Data2 if rgTest is zero.  If used with arrays, each element is evaluated separately.

See also

IF (control statement), StatSwitch


Imp

Syntax

rg = rgData1 Imp rgData2

Description

This operator computes the logical implication of two values.  The result is 1 if rgData1 is 0 or rgData2 is non-zero.  Otherwise, the result is 0.

The truth table for A Imp B is:

B

F	T

A   F	1	1

     T	0	1

See also

And, Or, Xor, Eqv, Not


Index Command
Index

Syntax

rv = Index(rsSize)

Description

This function creates an array of size rsSize.  Each element in the array is filled with the number of its index.  That is, the first element in the array gets the value 1, the second gets the value 2, and so on.


Log

Syntax

rg = Log(rgData)

Description

This function returns the logarithm, base e, of rgData.

See also

Log10, Exp


Log10

Syntax

rg = Log10(rgData)

Description

This function returns the logarithm, base 10, of rgData.

See also

Log, Exp10


Mask

Syntax

rg = Mask(rgValue, rgSwitch)

Description

This function returns a scalar or array of values based on rgSwitch and rgValue.  When rgSwitch is non-zero, the element returned in rg is rgValue.  When rgSwitch is zero, the element returned in rg is zero.

This is equivalent to:

rg = IF rgSwitch THEN rgValue ELSE 0

It is also equivalent to:

rg = rgValue * Bool(rgSwitch)

See also

IF, Bool, StatSwitch, VectSet, ZeroFill, Index


Max

Syntax

rg = Max(rgData1 [..., rgDataN])

Description

This function determines the maximum of a set of numbers.  If rgData1 through rgDataN are scalars, the value returned is the largest among them.  If a single array is used then the value returned is the largest element in the array.  If rgData1 through rgDataN are all arrays, or are a mix of arrays and scalars, then the return value is an array with an element by element maximum of the values.

No more than 15 values can be passed to Max.

See also

Min, StatMovMax


Min

Syntax

rg = Min(rgData1 [..., rgDataN])

Description

This function determines the minimum of a set of numbers.  If rgData1 through rgDataN are scalars, the value returned is the smallest among them.  If a single array is used then the value returned is the smallest element in the array.  If rgData1 through rgDataN are all arrays, or are a mix of arrays and scalars, then the return value is an array with an element by element minimum of the values.

No more than 15 values can be passed to Min.

See also

Max, StatMovMin


Mod

Syntax

rg = rgData1 Mod rgData2

Description

This operator computes rgData1 modulo rgData2, the remainder after rgData1 is divided by rgData2.


Not

Syntax

rg = Not rgData

Description

This operator returns the logical negation of rgData.  If rgData is zero, the result is 1.  Otherwise the result is zero.

See also

And, Or, Xor, Eqv, Imp, Bool


Or

Syntax

rg = rgData1 Or rgData2

Description

This operator returns the logical OR of two values.  The result is 1 if either rgData1 or rgData2 are non-zero.  If both rgData1 and rgData2 are 0, then the result is 0.

The truth table for OR is:

F	T

F	0	1

T	1	1

See also

And, Xor, Eqv, Not, Imp


Product

Syntax

rs = Product(rgData)

Description

This function computes the product of all the elements in rgData.  The product is all the elements in rgData multiplied together.

See also

Sum


Rnd

Syntax

rg = Rnd [(rsArrSize)]

Description

This function generates an approximately uniform pseudo-random number between 0 and 1.   If rsVecSize is given, it returns an array of size rsArrSize of pseudo-random numbers between 0 and 1.

See also

RANDOMIZE


Round

Syntax

rg = Round(rgData)

Description

This function returns rgData rounded to the nearest whole number.

See also

Floor, Ceil


RunTot

Syntax

rg = RunTot(rgData)

Description

This function computes the running total of an array.  Element i of the resulting array is the sum of elements 1 through i in rgData.

If RunTot is passed a scalar, it returns the scalar.

See also

Sum, StatMovTot


Sgn

Syntax

rg = Sgn(rgData)

Description

This function computes the signum function of rgData.  If rgData is negative, the result is -1.  If it is 0, the result is 0.  If it is positive, the result is 1.

See also

Abs


Sin

Syntax

rg = Sin(rgData)

Description

This function returns the sine of rgData.  rgData is specified in radians.

See also

ASin, Cos, Tan


Sqr

Syntax

rg = Sqr(rgData)

Description

This function returns the square of rgData.

See also

Sqrt


Sqrt

Syntax

rg = Sqrt(rgData)

Description

This function returns the square root of rgData.

See also

Sqr, Log, Log10, ^ (Exponentiation)


Sum

Syntax

rs = Sum(rgData)

Description

This function returns the sum of all the elements in an array.

See also

RunTot, StatMovTot, Product


Tan

Syntax

rg = Tan(rgData)

Description

This function computes the tangent of rgData.  rgData is specified in radians.

See also

ATn, ATan2, Cos, Sin


VectSet

Syntax

rv = VectSet(rsStart , rsIntvl , rsSize)

Description

This function creates a Boolean array of rsSize elements.  The array is initially all 0's, with periodic elements set to 1.

rsStart is the first element to set to 1.  rsIntvl indicates the interval between 1's.

See also

ZeroFill, Index, Mask, StatSwitch


Xor

Syntax

rg = rgData1 Xor rgData2

Description

This operator returns the logical exclusive-or of two values.  The result is 1 if rgData1 and rgData2 are both 0 or are both non-zero.  Otherwise, the result is 0.

The truth table for Xor is:

F	T

F	0	1

T	1	0

See also

Eqv, And, Or, Not, Imp


ZeroFill

Syntax

rg = ZeroFill(rgData)

Description

This function returns an array similar to rgData, but the zero elements are replaced with the value of the most recent non-zero element.  If the first element is zero, any elements up to the first non-zero element are zero.

If rgData is a scalar, rgData is returned.

See also

VectSet, Mask


*

Syntax

rg = rgData1 * rgData2

This command multiplies two values.


^

Syntax

rg = rgData1 ^ rgData2

This command computes rgData1 to the rgData2.


\

Syntax

rg = rgData1 \ rgData2

This command computes rgData1 divided by rgData2, rounded towards zero to the nearest integer.


+

Syntax

gg = Data1 + Data2

This command adds or concatenates two values.


-

Syntax

gg = Data1 - Data2

This command subtracts two values.


/

Syntax

rg = rgData1 / rgData2

This command divides two values.


<

Syntax

rg = Data1 < Data2

This command determines if one value is less than another.


<=

Syntax

rg = Data1 <= Data2

This command determines if one value is less than or equal to another.


>

Syntax

rg = Data1 > Data2

This command determines if one value is greater than another.


>=

Syntax

rg = Data1 >= Data2

This command determines if one value is greater than or equal to another.


<>

Syntax

rg = Data1 <> Data2

This command determines if two values are not equal.


=

Syntax

rg = Data1 = Data2

ggv = expression

This command determines if two values are equal, or sets a variable to the value of an expression.


Menu Commands (Language)
Menu Commands

This section lists menu commands.

MenuControl

MenuNew

MenuQ

MenuQUnique

MenuSelect

MenuSetCmd

MenuSetProc


MenuControl

Syntax

MenuControl(rsAction  [; rsPos])

Description

This command controls the appearance of the current menu.

rsAction	Function

_Close	Closes and destroys the menu, removing it from the menu bar.

_Show	Displays the menu in the menu bar.  By default, the menu is added to the end of the menu bar.  If rsPos is specified, the new menu will be placed after the menu with a menu number of rsPos.  If rsPos is zero, the new menu is placed at the beginning of the menu bar.

_Hide	Hides the menu and removes it from the menu bar.

A menu can be placed after one of the Realizer menus by specifying its menu number as rsPos.

rsPos	Menu

_FileMenu	The Realizer File menu.

_EditMenu	The Realizer Edit menu.

_RunMenu	The Realizer Run menu.

_WindowMenu	The Realizer Window menu.

_HelpMenu	The Realizer Help menu.

The predefined Realizer menus can be hidden, shown, and repositioned, but not closed.

See also

MenuSelect, MenuNew, MenuQ, MenuSetCmd


MenuNew

Syntax

MenuNew(rsMenuNum ; asTitle)

Description

This command creates a new menu called asTitle.  rsMenuNum is the menu number that is used to refer to the menu.  It should be between 1 and 32767.  If a menu with that number already exists, the old menu will be destroyed before the new one is created.  Menus are invisible when they are first created.

Keyboard accelerators for the menu are added by placing an ampersand before the character to be used for the keyboard accelerator.  The ampersand will not be displayed in the menu, but the accelerator character will be underlined.  The menu accelerator is activated when the user presses the accelerator key while holding the Alt key.

If an ampersand is needed in the menu title, && should be used.  Alt+& cannot be used as a menu accelerator.

See also

MenuQUnique, MenuSelect, MenuControl, MenuSetCmd, MenuQ


MenuQ

Syntax

rs = MenuQ(rsAction  [; rsMenuNum])

Description

This function returns information about a menu.  If rsMenuNum is not specified, the current menu is used.  If there is no current menu, or if the specified menu does not exitst, a real value of 0 is returned.

rsAction	Function

_Exists	Returns 1 if the menu exists and 0 if it does not.

_Selected	Returns the identification number of the currently selected menu.

_Title	Returns the title of the currently selected menu.

See also

MenuSelect, MenuControl


MenuQUnique

Syntax

rs = MenuQUnique

Description

This function generates a unique menu number for use with MenuNew.

See also

MenuNew


MenuSelect

Syntax

MenuSelect(rsMenuNum)

Description

This command selects a new current menu.  All subsequent menu commands will affect this menu.  rsMenuNum is the menu number or a constant identifying one of the predefined Realizer menus.

rsMenuNum	Menu

_FileMenu	The Realizer File menu.

_EditMenu	The Realizer Edit menu.

_RunMenu	The Realizer Run menu.

_WindowMenu	The Realizer Window menu.

_HelpMenu	The Realizer Help menu.

See also

MenuControl, MenuNew, MenuQ


MenuSetCmd

Syntax

MenuSetCmd(rgID [, agText] [, rgKey] [; rgStyle])

Description

This command adds or changes the items in the current menu.  The menu items will appear in the menu in the order in which they are added.

rgID is the identification number of the item in the menu.  It should be between 1 and 32767.  If rgID is _Separator, a separator bar will be placed in the menu.

agText is the name of the menu item.  An & can be used to set an accelerator key for the menu item.  The character following the & will be underlined, and it can be used in combination with the alt key to select the menu item while the menu is displayed.

If rgKey is used, it specifies a single key accelerator to use for the menu item.

rgKey	Accelerator Key

3 .. 12	f3 .. f12

13 .. 22	shift+f3 .. shift+f12

23 .. 32	cTRL+shift+f3 .. cTRl+shift+f12

33 .. 42	cTRl+alt+f3 .. cTRl+alt+f12

If an accelerator key is given for an item that has no text, the accelerator will be active but the command will not appear in the menu.  If rgKey is -1, any previous accelerator key for the menu item is removed.

rgStyle controls the appearance of the menu item.

rgStyle	Function

_Remove	The menu item is removed from the menu.

_Normal	The menu item is ungrayed.

_Gray	The menu item is grayed and cannot be selected by the user.

_Check	A check mark is placed next to the item's title.

_UnCheck	The check mark is removed from the item's title.

See also

MenuNew, MenuSetProc, MenuControl


MenuSetProc

Syntax

MenuSetProc[(procName | asMacroName)]

Description

This command sets the procedure or macro to invoke when the user selects an item in the current menu.  The procedure being set as the menu procedure must expect one parameter, called the menu procedure parameter array.

If a procedure or macro name is not specified, any procedure attached to the current menu will be disassociated from the menu.

See also

MenuNew, MenuSetCmd


Operating System Commands

This section lists operating system commands.

ClipGet

ClipSet

DDEControl

DDENew

DDEQ

DDEQUnique

DDESelect

DDESetProc

Help

HelpSetProc

SHELL


DDEControl

Syntax

DDEControl(rsAction [, asTopic  [, asData]] [; rsFormat])

Description

This command controls the current DDE session and sends messages to other sessions.  DDEControl cannot be used with DDE session -1.

If specified, rsFormat indicates the format of the data that is requested or sent.

The actions for a client session are:

rsAction	Function

_Request	Requests that the server send information about asTopic.

_Advise	Asks the server to send information about asTopic any time information associated with asTopic changes.

_Unadvise	Asks the server to stop advising on asTopic.

_Poke	Sends unrequested data to the server.  asData is the data relating to asTopic.

_Execute	Sends a set of commands, stored in asTopic, to the server for it to execute.

_Close	Closes the current DDE session.

The actions for a server session are:

rsAction	Function

_Data	Sends data to the client.  asData is the data relating to asTopic.

_Close	Closes the current DDE session.

See also

DDENew, DDESelect, DDESetProc


DDENew

Syntax

rs = DDENew(rsSessionNum, asApp, asTopic [; asTitle [, _AllFormats]])

Description

This function attempts to start a new DDE session.  asApp is the application being sought, and asTopic is the desired topic to discuss.  The identification number rsSessionNum will be used to refer to the conversation, and should be between 1 and 32767.  The value returned is rsSessionNum if a session can be started, and 0 otherwise.

If the connection is being established as a server session, rsSessionNum should be the session parameter from the DDE server initiator procedure.

asTitle sets a title for the session.  By default, only text data is received.  If _AllFormats is used, data will be sent and received in any format.

See also

DDEQUnique, DDEControl, DDESelect, DDEQ, DDESetProc


DDEQ

Syntax

rs = DDEQ(rsAction  [; rsSessionNum])

Description

This function returns information about a DDE session.  If rsSession is not specified, the currently selected session is used.  If there is no current session, or the specified session does not exist, a real scalar value of 0 is returned.

rsAction	Function

_Exists	Returns 1 if the session exists and 0 if not.

_Selected	Returns the number of the currently selected DDE session.

_Title	Returns the title of the DDE session, as specified with DDENew.

_Style	Returns 1 if the currently selected DDE session is a client session.  Returns 2 if it is a server session.

See also

DDENew


DDEQUnique

Syntax

rs = DDEQUnique

Description

This function generates a unique number for use with DDENew.

See also

DDENew


DDESelect

Syntax

DDESelect(rsSessionNum)

Description

This command selects a new current DDE session to be affected by subsequent DDE commands. rsSessionNum can be -1 or a number between 1 and 32767.

See also

DDENew, DDEControl


DDESetProc

Syntax

DDESetProc[(ProcName | asMacroName)]

Description

This command sets a procedure to invoke when DDE messages arrive for the current session.

DDE session procedures must have the following parameters:

ProcName(rsSessionNum, rsMessage, asTopic, asData)

If the DDE session was created with the _AllFormats style, the procedure must also expect a format modifier:

ProcName(rsSessionNum, rsMessage, asTopic, asData ; rsFormat)

Session number -1, the built-in Realizer server initiator session, should have a procedure with the following parameters:

ServerInitiator(rsSessionNum, rsMessage, asApp, asTopic)

If a procedure or macro is not specified, any procedure attached to the current DDE session will be disassociated from the session.


Help

Syntax

Help(asHelpFile, gsTopic)

Description

This command invokes the Microsoft Help Manager, bringing up information about the topic gsTopic in the help file asHelpFile.  If no extension is given for the help file name, .HLP is used.

The topic can be specified by a topic name or a topic number.  This corresponds to a topic name or number embedded in the help file.  If gsTopic is _HelpIndex, the help file's index is displayed.

The help file must be created with the Microsoft Help Compiler, part of the Windows Software Development Kit.  See the associated documentation for details.

See also

HelpSetProc


HelpSetProc

Syntax

HelpSetProc[(procName  | asMacroName)]

Description

This command sets the procedure or macro that will be invoked when the user requests help by pressing the f1 key.  If a procedure or macro is not specified, any help procedure that is already established will be disassociated from the help key.

See also

Help


ClipGet

Syntax

as = ClipGet

Description

This function returns a string containing the text that is in the clipboard.  If there is no text in the clipboard, the result will be an empty string.

See also

ClipSet


ClipSet

Syntax

rs = ClipSet(asText)

Description

This function puts text into the clipboard.  If ClipSet is unable to copy data into the clipboard, the returned value will be 0.  Otherwise it will be 1.

See also

ClipGet


SHELL

Syntax

SHELL asOSCommand  [, rsAppStyle ]

Description

This command executes an operating system command.

asOSCommand is an operating system command line.  It can be the name of an application, such as "Excel", an application with command line parameters, such as "Excel MySheet.xls", or a DOS command such as "COPY C:\FOO A:".

rsAppStyle controls the appearance of the launched application:

rsAppStyle	Description

_Normal	The new application will appear with its default size.

_Minimize	The new application will be minimized when it appears.

_Maximize	The new application will be maximized when it appears.

_Inactive	The new application will appear minimized, but will not be frontmost.

_DOS	The command will be run in a DOS window

See also

IDLE


Scheduler Commands

This section lists scheduler commands.

SchedControl

SchedNew

SchedQ

SchedRemove

SchedSet


SchedControl

Syntax

SchedControl(rsAction [; [rsStyleFlags,] [rsLeft, rsTop [, rsWidth, rsHeight]]])

Description

This command controls the appearance and operation of the Scheduler.

rsAction	Function

_Start	Starts the Scheduler.

_Stop	Stops the Scheduler.

_Clear	Removes all events from the Scheduler.

_Show	Displays the Scheduler.

_Hide	Hides the Scheduler.

_Size	Sets the size and the position of the Scheduler, according to the size modifiers rsLeft, rsTop, rsWidth, and rsHeight.  These values are specified using Realizer's position notation.

_Print	Prints the Scheduler.  The size and position of the scheduler on the page can be specified with rsLeft, rsTop, rsWidth and rsHeight using Realizer's position notation.  The printer style flags can be specified with rsStyleFlags.

_Minimize	Displays the Scheduler in its iconic form.

_Maximize	Displays the Scheduler filling the entire Realizer window.

_Restore	Restores a maximized or minimized Scheduler to its previous size.

rsStyleFlags	Function

_NoHeader	Prevents a header from being printed at the top of the page.

_NoFooter	Prevents the page number from being printed at the bottom of the page.

See also

SchedSet, SchedRemove, SchedNew


SchedNew

Syntax

SchedNew[( ; asTitle  [, rsStyle])]

Description

This command alters the appearance of the Scheduler.  asTitle specifies a different title for the Scheduler window.  rsStyle can be the sum of any of the following flags:

rsStyle	Function

_Close	Allows the Scheduler to be closed from the Scheduler window's system menu or the Realizer File Close menu.  Closing the Scheduler is the same as hiding it.

_Frame	Places a frame around the Scheduler window.  Cannot be used in conjunction with _Title or _Size.

_Size	Places a thick sizing frame around the Scheduler window.  If _Title is also set, a maximize icon will be placed in the title bar.

_Title	Puts a title bar at the top of the window making the window moveable.

_Minimize	Allows the window to be minimized from the Scheduler window's system menu.  If _Title is also set, a minimize icon will be placed in the title bar.

_HotClick	Causes mouse clicks in the Scheduler to be processed even when the Scheduler is not the active window.  By default, a mouse click in a background window only brings that window forward.  The Scheduler's Start/Stop button is always "hot."

By default rsStyle is _Title + _Size + _Minimize + _Close.

See also

SchedControl, SchedQ


SchedQ

Syntax

rg = SchedQ(rsAction)

Description

This function returns information about the Scheduler.

rsAction	Function

_Size	Returns a four element array representing the size and position of the Scheduler in pixels.  The first element is the location of the left side of the Scheduler window.  The second is the location of the top of the Scheduler.  The third is the width of the window. The fourth is the height of the window.

_Style	Returns the style of the Scheduler's window, as set by SchedNew.

_Title	Returns the title of the Scheduler.

_HWnd	Returns the window handle of the Scheduler for use with external procedures and custom controls.

See also

SchedControl, SchedNew


SchedRemove

Syntax

SchedRemove(rsEvent)

Description

This command removes an event from the Scheduler. rsEvent is the identification number of the event to remove, as returned by SchedSet.

See also

SchedSet, SchedControl


SchedSet

Syntax

rsID = SchedSet(asCommand, dsStart [, rsHours [, rsMinutes [, rsSeconds]]] [; _StartAtNext])

Description

This function adds an event to the Scheduler.  asCommand is the command to execute.  It can be any Realizer statement, such as a PRINT statement, or a procedure call.  dsStart is the day and time to execute the command.

If the command is to be repeated periodically, rsHours, rsMinutes, and rsSeconds indicate how often the command should be executed.  If they are specified, then once the command is finished it will be placed back in the Scheduler to be executed after the specified time has elapsed.

If dsStart is earlier than the current time, the command is executed and then rescheduled for the first time after the current time which is an integral number of interval times from dsStart.  The _StartAtNext modifier prevents the first execution of the command.

The value returned by SchedSet is an identifier for the event.  It can be used with SchedRemove to remove the event from the Scheduler.

See also

SchedRemove, SchedControl


Spreadsheet Commands

This section lists spreadsheet commands.

SheetControl

SheetNew

SheetQ

SheetQUnique

SheetSelect

SheetSetProc

SheetUpdate


SheetControl

Syntax

SheetControl(rsAction [; [rsStyleFlags,] [rsLeft, rsTop[, rsWidth, rsHeight]]])

SheetControl(_Scroll;  ggvColumn, rsRow)

Description

This command controls the appearance of the currently selected sheet.

rsAction	Function

_Close	Closes the sheet.

_Show	Displays the sheet.

_Hide	Hides the sheet.

_Size	Sets the size and the position of the sheet, according to the size modifiers rsLeft, rsTop, rsWidth and rsHeight.  These values are specified using Realizer's position notation.

_Print	Prints the sheet.  The size and position of the sheet on the page can be specified with rsLeft, rsTop, rsWidth and rsHeight using Realizer's position notation.  The printer style flags can be set with rsStyleFlags.

_Minimize	Displays the sheet in its iconic form.

_Maximize	Displays the sheet filling the entire Realizer window.

_Restore	Restores a maximized or minimized sheet to its previous size.

_Scroll	Brings the cell in row rsRow of the variable ggvColumn into view.

rsStyleFlags	Description

_NoHeader	Prevents a header from being printed at the top of the page.

_NoFooter	Prevents the page number from being printed at the bottom of the page.

_NoHLines	Prevents the horizontal lines in the sheet from being printed.

_NoVLines	Prevents the vertical lines in the sheet from being printed.

_NoColHeaders	Prevents the column headers from being printed.

_NoRowHeaders	Prevents the row headers from being printed

See also

SheetNew, SheetSelect, SheetQ, LFLUSH, SetFormat


SheetNew

Syntax

SheetNew(rsSheetNum, ggvData1  [, ... ggvDataN] [; asTitle  [, rsStyle]])

Description

This command creates a new sheet.  rsSheetNum is the sheet number used to refer to the sheet, and should be between 1 and 32767.  If a sheet with that number already exists, the old one will be destroyed before the new one is created.

Variables can be placed in the sheet by listing them as ggvData1 through ggvDataN.  Other variables can be added after the sheet is created by using the SheetUpdate command.

The title for the sheet window can be specified with asTitle.  By default the title is "Sheet rsSheetNum".  rsStyle controls the appearance of the window.  It can be the sum of any of the following flags:

rsStyle	Effect

_Close	Allows the sheet to be closed from the sheet window's system menu or the Realizer File Close menu.

_Frame	Places a frame around the sheet window.  Cannot be used in conjunction with _Title or _Size.

_Size	Places a thick sizing frame around the sheet window.  If _Title is also set, a maximize icon will be placed in the title bar.

_Title	Puts a title bar at the top of the window making the window moveable.

_Minimize	Allows the window to be minimized from the sheet window's system menu.  If _Title is also set, a minimize icon will be placed in the title bar.

_HotClick	Causes mouse clicks in the sheet to be processed even when the sheet is not the active window.  By default, a mouse click in a background window only brings that window forward.

By default, the sheet's window style is _Title + _Size + _Minimize + _Close.

When a sheet is created it is invisible.  SheetControl can be used to make it visible.  The SetFormat command can be used to change the format of a column.  SheetUpdate can be used to adjust the width of a column.

See also

SheetQUnique, SheetSelect, SheetControl, SheetUpdate, SheetQ, SetFormat


SheetQ

Syntax

rg = SheetQ(rsAction  [; rsSheetNum [, rsFormNum]])

Description

This function returns information about a sheet.  rsSheetNum is the number of the sheet.  If the sheet is in a form, rsFormNum should also be specified.

If a sheet is not specified, the currently selected sheet is used.  If there is no current sheet, or if the specified sheet does not exist, a real value of 0 is returned.

rsAction	Function

_Exists	Returns 1 if the sheet exists.  Otherwise it returns 0.

_Selected	Returns a two element array containing the number of the currently selected sheet.  The first element contains the sheet number.  If the sheet is in a form, the second element contains the form number.  Otherwise the second element is zero.

_Size	Returns a four element array representing the size and position of the sheet in pixels.  The first element is the location of the left side of the sheet.  The second is the location of the top of the sheet.  The third is the width of the sheet. The fourth is the height of the sheet.

_Title	Returns the title of the sheet.

_Style	Returns the style of the window, as set by SheetNew.

_HWnd	Returns the window handle of the sheet for use with external procedures and custom controls.

See also

SheetNew, SheetControl


SheetQUnique

Syntax

rs = SheetQUnique

Description

This function generates a unique sheet number for use with SheetNew.

See also

SheetNew


SheetSelect

Syntax

SheetSelect(rsSheetNum  [, rsFormNum])

Description

This command selects the current sheet to be affected by subsequent sheet commands.

rsSheetNum is the identification number of the sheet.  If the sheet is in a form, rsFormNum should also be specified.  It is an error to select a sheet that does not exist.

See also

SheetNew, SheetControl, SheetQ


SheetSetProc

Syntax

SheetSetProc[(procName  | asMacroName)]

Description

This command sets a procedure or macro for the current sheet to invoke when it is closed or the user double-clicks in a cell.  The procedure being set as a sheet procedure must expect two parameters.  The first is the tool procedure parameter array.  The second is the variable for the column containing the cell that was double-clicked.

If a procedure or macro is not specified, any procedure attached to the current sheet is disassociated from the sheet.


SheetUpdate

Syntax

SheetUpdate[(ggvData1 [..., ggvDataN][; rsWid1 [..., rsWidN])]

Description

This command updates or adds variables to the current sheet.  If a variable is already in the sheet, then all the cells for that variable are updated. Otherwise, the variable is added to the end of the spreadsheet.  If no variables are specified, then all the columns in the sheet are updated.

rsWid1 through rsWidN specify the width, in characters, of the columns for ggvData1 through ggvDataN.  Width values less than 1 cause a column to return to the default width of 12 characters.

See also

SheetNew, SheetControl, SheetSelect


Statistics Commands

This section lists the statistics commands.

StatMovAvg

StatMovMax

StatMovMin

StatMovTot

StatNorm

StatPack

StatPercent

StatRank

StatRegress

StatSort

StatSwitch

StatUnPack


StatMovAvg

Syntax

rg = StatMovAvg(rgData, rgLengths)

Description

This function computes the moving average of rgData.  The moving average is an array of values such that element i in the resulting array is the average of elements i-N+1 through element i in rgData.  The value of N can be constant, or can vary for each element.  rgLengths is a scalar or an array representing the values of N.

If the value of N is greater than i for any element, then all of the preceding elements in the resulting array are considered invalid.

See also

StatMovTot, StatMovMax, StatMovMin


StatMovMax

Syntax

rg = StatMovMax(rgData, rgLengths)

Description

This function computes the moving maximum of rgData.  The moving maximum is an array of values such that element i in the resulting array is the maximum of elements i-N+1 through element i in rgData.  The value of N can be constant, or can vary for each element.  rgLengths is a scalar or an array representing the values of N.

If the value of N is greater than i for any element, then all of the preceding elements in the resulting array are considered invalid.

See also

Max, StatMovTot, StatMovAvg, StatMovMin


StatMovMin

Syntax

rg = StatMovMin(rgData, rgLengths)

Description

This function computes the moving minimum of rgData.  The moving minimum is an array of values such that element i in the resulting array is the minimum of elements i-N+1 through element i in rgData.  The value of N can be constant, or can vary for each element.  rgLengths is a scalar or an array representing the values of N.

If the value of N is greater than i for any element, then all of the preceding elements in the resulting array are considered invalid.

See also

Min, StatMovMax, StatMovTot, StatMovAvg


StatMovTot

Syntax

rg = StatMovTot(rgData, rgLengths)

Description

This function computes the moving total of rgData.  The moving total is an array of values such that element i in the resulting array is the total of elements i-N+1 through element i in rgData.  The value of N can be constant, or can vary for each element.  rgLengths is a scalar or an array representing the values of N.

If the value of N is greater than i for any element, then all of the preceding elements in the resulting array are considered invalid.

See also

Sum, RunTot, StatMovMax, StatMovMin, StatMovAvg


StatNorm

Syntax

rv = StatNorm(rvData, rsMin, rsMax)

Description

This function computes rvData normalized between rsMin and rsMax.  The smallest element in the array becomes rsMin.  The largest becomes rsMax.  All the other elements in rvData are scaled linearly between these two values.  If all the elements in rvData are the same, they will be mapped to rsMin.

See also

StatPercent, StatRank, StatRegress


StatPack

Syntax

StatPack(fResult, rvSwitch, gvData)

Description

This command produces a compressed version of an array by packing only elements that meet a certain criteria.

gvData is the array to be compressed.  rvSwitch is a Boolean array indicating which elements in gvData are to be kept.  The results are placed in fResult, which will have four members.  The PV ("packed value") member is an array of the values with a corresponding true value in rvSwitch.  The PI ("packed index") member is a parallel array indicating the original index of the value within gvData.  The PSV ("packed StartValid") member indicates the first valid element in gvData.  The PEV ("packed EndValid") member indicates the last valid element in gvData.

A sparse array with many zero entries can be packed by using gvData as the Boolean rvSwitch array.

See also

StatUnpack


StatPercent

Syntax

rg = StatPercent(rgData)

Description

This function computes an array expressing each element of rgData as a percentage of the entire array.  Each element in the resulting array will be equal to the corresponding element in rgData divided by the sum of all the elements in rgData.

If the sum of rgData is 0, then the resulting array will be all zeros.  The result for a scalar is always 1.

See also

StatNorm, StatRank, StatRegress


StatRank

Syntax

rv = StatRank(rvData)

Description

This function determines the rank of the elements in rvData.  The rank is the position that the element would be in if the array were sorted in ascending order.  The smallest element is assigned the rank of 1, the next smallest is 2, and so on.

If there are multiple elements with the same value, the rank will include a fractional portion.  If there are N elements that are the Mth largest number, each will be given the rank M + 1/N.

See also

StatSort, StatNorm, StatPercent


StatRegress

Syntax

rv = StatRegress(rvData)

Description

This function computes an array representing a least squares regression line of rvData.  The resulting array contains the y values of the points on the line forming the best linear approximation of rvData.

See also

StatNorm, StatPercent, StatRank


StatSort

Syntax

gv = StatSort(gvSort [, gvData])

Description

This function computes a sorted array based on gvSort.  If gvData is not specified, the result is the elements of gvSort sorted in ascending order.

If gvData is specified, then the result is the elements of gvData sorted according to the values in gvSort.  If element i is the least element in gvSort, then the first element in the resulting sorted array will be gvData[i] and so on.

See also

SetSys(_CaseSensitive), StatRank


StatSwitch

Syntax

rv = StatSwitch(rvOn, rvOff)

Description

This function creates a Boolean array of 1's and 0's based on two other arrays.

If element i in rvOn and rvOff are both 0, then element i in the resulting array is the same as element i-1.  If element i in rvOn is non-zero, then element i in the resulting array is set to 1.  If element i in rvOff is non-zero, then element i in the resulting array is set to 0.  If element i in both rvOn and rvOff is non-zero, then element i in the resulting array is set to 0 (i.e. rvOff is "stronger").

rvOff[i]	rvOn[i]	rv[i]

0	0	rv[i-1]

0	non-zero	1

non-zero	0	0

non-zero	non-zero	0

If the first element of both rvOff and rvOn is 0, then rv[1] is set to 0.

See also

VectSet, Mask, Bool


StatUnpack

Syntax

gv = StatUnpack(fPacked)

gv = StatUnpack(rvIndex, gvData [, rsStartValid  [, rsEndValid]])

Description

This function unpacks an array that was compressed by StatPack.

There are two formats for this function.  The first takes the family of data created by StatPack.  The PV member is the array of values to restore.  The PI member is the array of indices corresponding to the values in PV.  All elements not found in PI will be zeros in the resulting array.

The PSV element is optional, and represents the first valid element in the resulting array.  The PEV element is also optional, and represents the last valid element in the resulting array.

The second format works identically, but each member is passed as a separate parameter.

See also

StatPack


Standard User Interface Commands

This section lists the standard user interface commands.

StdFont

StdOpen

StdPrintConfig

StdSaveAs


StdFont

Syntax

av = StdFont[(asCaption [, asOK [, asCancel  [, asSample]]])]

Description

This function displays the standard dialog for selecting a font.

The "Select font:" caption can be changed by specifying asCaption.  The OK and Cancel button text can be replaced by asOK and asCancel.  The sample of text displayed can be altered by specifying asSample.

After the dialog is displayed, Realizer waits for the user to select a font and press OK or Cancel.  The return value is a string array with three elements:  the font name, the font size and the font style.  If the user presses Cancel, all three strings will be empty.

See also

StrToNum, FontNew


StdOpen

Syntax

as = StdOpen(asFilePat [, asCaption [, asOpen [, asCancel]]])

Description

This function displays the standard dialog for selecting a file name.

A file filter pattern may be defined through asFilePat.  A file pattern of "*.* can be used to list all the files in the current directory.  The default caption of "Open file:" can be replaced by specifying asCaption.  The OK and Cancel button text can be replaced with asOK and asCancel.

The return value is the name of the file that the user selected.  If the user pressed Cancel, the return value will be an empty string.

See also

FileOpen, StdSaveAs


StdPrintConfig

Syntax

StdPrintConfig

Description

This command brings up the standard printer configuration dialog, allowing the user to change the selected printer and adjust the printer configurations.

See also

StdFont


StdSaveAs

Syntax

as = StdSaveAs(asDefaultFile [, asCaption [, asSave [, asCancel]]])

Description

This command displays the standard dialog for selecting a file name to save.

The default file name is asDefaultFile.  The default caption of "Save file as:" can be replaced by specifying asCaption.  The OK and Cancel button text can be replaced with asOK and asCancel.

The return value is the name of the file that the user specified.  If the user pressed Cancel, the return value will be an empty string.

See also

StdOpen, FileOpen


String Commands

This section lists commands for manipulating alphas.

Asc

Chr$

InStr

Left$

Len

Mid$

Right$

Sprint

String$

StrToDate

StrToNum

SubStr$


Asc

Syntax

rs = Asc(asChar)

Description

This function returns the ASCII value of the first character in asChar.

See Also

Chr$


Chr$

Syntax

as = Chr$(rsAscii)

Description

This function returns the character corresponding to the ASCII value rsAscii.

See also

Asc


InStr

Syntax

rs = InStr(asString, asToFind  [, rsStart])

Description

This function searches for a string within another string.  asString is the string to search.  asToFind is the substring to find.  rsStart indicates the character within asString from which to begin the search.

The value returned will be the character position of the first occurrence of asToFind, or 0 if there is no match.

See also

SubStr$, Left, Mid$, Right$, SetSys(_CaseSensitive)


Left$

Syntax

as = Left$(asString, rsNumChars)

Description

This function returns the rsNumChars leftmost characters in asString.

See also

Right$, Mid$, InStr, SubStr$


Len

Syntax

rs = Len(asString)

Description

This function returns the number of characters in asString.

See also

Mid$, Left$, Right$, SubStr$, InStr


Mid$

Syntax

as = Mid$(asString,  rsStart [, rsNumChars])

Description

This function returns a portion of asString.  rsStart is the first character to retrieve.  If specified, rsNumChars indicates the number of characters to return.  Otherwise, all the characters after rsStart are returned.

See also

Right$, Left$, InStr, SubStr$


Right$

Syntax

as = Right$(asString, rsNumChars)

Description

This function returns the rsNumChars rightmost characters in asString.

See also

Left$, Mid$, InStr, SubStr$


Sprint

Syntax

as = Sprint(asFormat, gsData1 [..., gsDataN])

as = Sprint(gsData)

Description

This function is used to format text and data in a string.  It is similar to PRINT USING.

asFormat is the format string.  gsData1 through gsDataN are the data values that correspond to the formatting fields.  If asFormat is not specified, the default format for gsData is used.

See also

PRINT, SetFormat, Formats


String$

Syntax

as = String$(rsLen, rsAscii | asFillText)

Description

This function creates a string containing rsLen characters.  If rsAscii is used, the string is filled with that ASCII character.  If asFillText is used instead, then the resulting string is asFillText repeated until the string is rsLen characters long.

See also

Chr$, Asc, SubStr$


StrToDate

Syntax

ds = StrToDate(asDate)

Description

This function converts a string to a date-time value.  The string can contain a date and a time portion in any of the following formats:

Date Format	Example

YYMMDD	900219

M/D/Y	2/19/90

2/19/1990

2/ 19/ 90

D-MMM-Y	19-Feb-90

19-February-1990

Time Format	Example

hhmm	0945

h:m[:s]	9:45

09:45

9: 45

9:45:32

21:45:32

h:m[:s] xM	9:45 AM

9:45:32 PM

12:02:20 AM

If the string is invalid, the result will be 1/1/1900  00:00:00.

See also

Sprint, StrToNum


StrToNum

Syntax

rs = StrToNum(asValue)

Description

This function converts a string to a real value.  If the string is not a valid number, the result will be 0.  Valid numbers can include a plus or minus sign and can be in exponential notation.

See also

Sprint, StrToDate


SubStr$

Syntax

as = SubStr$(asSource, asFind, asReplace [, rsStart  [, rsNumChars]])

Description

This function can be used to insert, delete or modify portions of a string.  It finds all occurrences of asFind within asSource, and replaces them with asReplace.

If rsStart is specified, then the search begins with the rsStartth character in the string.  If rsNumChars is specified, then only that many characters are scanned

If asFind is empty, then the rsNumChars(possibly 0) characters starting at rsStart are replaced with asReplace.  If asFind and asReplace are both empty, the rsNumChars characters starting at rsStart are deleted.

See also

InStr, Mid$, Left$, Right$


Formats

String Formats

&	Includes the complete string.

!	Uses the first character from the string.

\  \	Prints the first n+2 characters from the string, where n is the number of characters between the two slashes.  Note that the number of characters printed will be the same size as the \  \ combination.  The actual characters between the backslashes are ignored.

_   (underscore)	Prints the next character exactly as it appears without using it as a formatting command.  This is used to allow &, ! and the other formatting characters to be used as normal characters.

Real Formats

###.##	Specifies the precision and size of a real.  The real will have as many leading digits as there are #'s preceding the decimal point, and will have as many decimal digits as there are #'s following the decimal point.  Leading spaces will be padded.  If the number of significant digits exceeds that requested, the space will be filled with asterisks.

$$	Places a dollar sign to the left of the number  ($123.45).

$#	Places a dollar sign in the leftmost position  ($  123.45).

**	Pads with asterisks instead of spaces  (***123.45).

*#	Places an asterisk in the leftmost position (*  123.45).

**$	Puts a dollar sign to the left of the number and pad with asterisks  (**$123.45).

$**	Puts a dollar sign in the leftmost position and pad with asterisks  ($**123.45).

^^^	Used with any # format to print the number using exponential notation.  If three ^'s are used, the exponent will have one digit.  If four ^'s are used, the exponent will have two digits.  If five ^'s are used, the exponent will have three digits.  For example, ##.##^^^^ will display  12.35E+01.

P(x)	Prints the number rounded to 10xth.  Leading spaces will not appear.  For example, P(2) will display 123.456 as 100, and P(-2) will display 123.45.

Fractional Formats

The general format for fractions is Fdd(xxx) where dd is a number less than or equal to 10000 that defines the denominator, and xxx provides formatting information.  Note that the denominator uniquely determines the numerator and denominator values.  The numerator is rounded to the nearest whole number.

xxx is a combination of characters to be printed literally and any of the following formats:

W1	Outputs an optional minus-sign, then the whole part.

W2	First outputs an optional minus-sign.  Then, if the whole part is zero, outputs nothing and skips any literal characters up to the next fractional format command.

W3	If the numerator is zero, prints the whole part with an optional minus-sign, and ignores all formats until the ending parentheses.  Otherwise, uses W2.

N1	Outputs the numerator.

N2	Outputs the reduced numerator.

N3	Outputs the numerator padded with zeros.

N4	If the numerator is zero, outputs nothing and skips all formats until the ending parenthesis.

D1	Outputs the denominator.

D2	Outputs the reduced denominator.

_   (underscore)	Outputs the next character literally.  This allows W, D, and N to appear.

Date-Time Formats

The general format for date-time values is D(xxx), where xxx is a combination of ASCII characters to be printed literally and any of the following formats:

Y1	Prints the last two digits of the year  (e.g. 91 for 1991).

Y2	Prints the full four digits of the year  (e.g. 1991).

M1	Prints zero padded two digits for the month  (e.g. 04 for April).

M2	Prints unpadded two digits for the month  (e.g. 4 for April).

M3	Prints the three letter abbreviation for the month  (e.g. Apr).

M4	Prints the full name of the month  (e.g. April).

D1	Prints zero padded number of the day  (08 for April 8th).

D2	Prints unpadded two digits for the day  (e.g. 8 for April 8th).

D3	Prints the ordinal for the day  (e.g. 8th for April 8th).

D4	Prints the three letter abbreviation for the day  (e.g. Tue for Tuesday).

D5	Prints the full name of the day  (e.g. Tuesday).

h1	Prints zero padded 24-hour hour  (e.g. 09 for 9:34 AM).

h2	Prints unpadded 24-hour hour  (e.g. 14 for 2:34 PM).

h3	Prints zero padded 12-hour hour  (e.g. 02 for 2:34 PM).

h4	Prints unpadded 12-hour hour  (e.g. 2 for 2:34 PM).

h5	Prints AM or PM  (e.g. PM for 2:34 PM).

m1	Prints zero padded two digits for the minute  (e.g. 06 for 3:06 PM).

s1	Prints zero padded two digits for the second  (e.g. 09 for 3:22:09 PM).

_   (underscore)	Prints the next character literally.  Used to allow Y, D, and so on to appear.


Order of Operations

(    )	Parentheses

[    ]	Array Brackets

^	Exponentiation

-    (unary minus)	Unary Minus

*    /	Multiplication and Division

\	Truncated Division

Mod	Modulus

+   -	Addition and Subtraction

=    <>    >    <    >=    <=	Comparison

Not	Logical Negation

And	Logical And

Or	Logical Or

Xor	Logical Exclusive Or

Eqv	Logical Equivalence

Imp	Logical Implication


Procedure Parameters

When a tool procedure is called, an array of information is passed as the first parameter to the procedure.  This array describes the type of tool manipulated, its identification number and form number, how it was manipulated and the position in the tool where the user clicked.

The tool procedure parameter array may be indexed using the following constants:

Parameter Element	Description

params[_Invoke]	The reason the procedure was invoked. (e.g. click or close)

params[_FormNum]	The number of the form containing the selected item (if applicable.)

params[_MenuNum]	The number of the menu containing the selected item (if applicable.)

params[_ItemNum]	The identification number of the tool, object or menu item selected.

params[_ItemType]	Type of the item that was selected.

params[_XPos]	The X position of the action if it occurs in a chart, sheet or bitmap.

params[_YPos]	The Y position of the action if it occurs in a chart, sheet, or bitmap.

params[_UseRealizer]	Element used for special processing.


Positions

The positions and sizes of Realizer tools and the items within them can be specified in pixels, percentages, inches or millimeters.  When specifying the size and placement of a tool, percentages are relative to the size of the inside of the Realizer window.  When describing the size and position of an object within a tool (e.g. a button in a form), percentages are relative to the size of the inside of the tool.

Horizontal positions increase from left to right.  Vertical positions increase from top to bottom.  The upper left corner of a window is pixel location (0, 0).  Position values can be expressed in the form rsValue unit, where unit is one of the following:

pxl	pixels

in	inches

mm	millimeters

pct	percent

If unit is unspecified, values between 0 and 1 are assumed to be percentages, where 1 is 100 percent, and values from 1.1 and above are pixels.

When specifying the positions for the upper left corner of a tool or object (e.g. rsLeft and rsTop), the following special values can be used:

_Left	Left justified

_Right	Right justified

_Bottom	Bottom justified

_Top	Top justified

_Center	Centered

_Default	Default value

_Default can also be used for specifying widths and heights (rsWidth and rsHeight).

Pixels can be converted to inches using the _HPxlPerInch and _VPxlPerInch constants, which are the number of pixels per horizontal and vertical inch of the screen device.


Array Notation

V	The whole array.

V 	{ 2, 4, 6, 8, 10, 12, 14, 16 }

V[x]	Element x of array V.  V[x] is a scalar.

V[5] 	{ 10 }

V[x:y]	Elements x through y of array V.

V[4:7] 	{ 8, 10, 12, 14 }

V[-x]	The array V with elements shifted ahead by x units.  The valid range is also adjusted to match the shifted elements.

V[-3] 	{ ?, ?, ?, 2, 4, 6, 8, 10, 12, 14, 16 }

V[+x]	The array V with elements shifted back by x units.  Elements shifted before element 1 are discarded.

V[+3] 	{ 10, 12, 14, 16 }


Procedures

This section documents elementary actions you might need to perform while running Realizer.

Program Commands

Running a program

Running a few lines

Debugging a program

Editing a program

Designing a user interface

Editing commands

Finding and replacing text

Moving to a line

Windowing commands

Arranging windows

Bringing a window to the front

File Commands

Opening a file

Saving a file

Encrypting a file


Running a Program

There are several ways to run a Realizer program.  The simplest is to use the File Execute menu command.  This will bring up a dialog box asking you for the name of the file to run.  Double-click on the program you want to run.

You can also open a program, using File Open, and then run it using the Go command from the Run menu.


Running a Few Lines

If you want to run a few lines from a program, you can select the lines with the mouse and select Run Instant.  If no lines are selected, this will run the line containing the insertion bar.


Debugging a Program

When you want to debug a program you should display the debugging tools with the Windows Show Debugger command.

There are several options for stepping through the code.  Step executes the next line, without stopping at each line within called procedures, functions, or macros.  Trace In executes the next line, but unlike Step, stops at the first line within any called procedures, functions, or macros.  Skip skips the next line of code.  Trace Out is used in conjunction with Trace In.  It finishes the Traced In line without stopping.

The Call Tree is useful for seeing what procedures, functions, or macros are in the middle of execution when a particular line is reached.   Double clicking on an item in the Call Tree display brings up the corresponding source code.

The debugging area contains a history window showing the last set of lines single stepped through.  Clicking on the margin of the history window shows the file and line number of that line.  Double clicking on the line brings up the source code for the line.

The Variables command shows all current variables, including procedures and functions.  When LOCAL variables are used, their level is indicated, and reference parameters are dereferenced.  Double clicking on an array displays its first 100 elements.

If an error occurred, a message box will appear displaying an error message.  Clicking in this box makes it go away.  You can then correct the program and continue.  The line at which the program stopped will be shown in the history box.  You can quickly move to the errant line by double clicking in the history window.  A portion of the history line will be shown in red to help indicate the error.

You can place breakpoints in a program using the STOP command.  Once the program is halted, you can run lines in Instant mode, see what lines were executed by examining the Call Tree, list all variables, or single step through the code.  All of these options are available through the Run menu and the debugging tools.

You can stop a program with the Run Stop command or the Stop icon.

If you want to prevent DDE messages or user events, such as menu selection, from invoking procedures within your program while you are debugging, set Full Stop on in the Run menu.


Editing a Program

To edit a program, open the program using the File Open command.  Then make any changes you want to the file.  You can scroll through the text, cut, paste, and copy, and insert or delete any text you want.  When you have finished making changes, you may want to save the file using the File Save or File Save As command.  You may want to run a program to get out the bugs before you save it.


Designing a User Interface

You can design a user interface quickly by using FormDev, the visual form designer.  This allows you to position objects on the screen as you desire, and even associate action code with any of the objects.  FormDev will then create a Realizer program for you.  You can modify the program using FormDev or by editing the program that it creates.  See the documention on FormDev for more information.


Finding Text

You can search through a program window or log for text.  To do so, select the Edit Find command.

Once you have performed a Find, you can find the same text again without having to fill in the Find dialog box.  Simply use the Edit Find Again command.

To replace text, use the Edit Replace command.  It will bring up a dialog box similar to the Find dialog box, only it lets you specify the text with which to replace the found text.


Moving to a Line

To move to a specific line in a program window or log, use the Edit Where command.


Arranging Windows

If you have created a large number of windows, whether program windows, logs, forms, charts, or whatever, you may find the screen quite cluttered.  You can automatically arrange all the windows with the Tile, Cascade, and Arrange Icons commands from the Window menu.  Tiled windows are arranged so that none of the windows overlap.  Cascade windows overlap, with each window slightly down and to the right of the previous.  Arrange Icons organizes icons without changing the position of non-minimized windows.


Bringing a Window to the Front

There are several ways to bring a particular window to the front of the screen.  The easiest way is simply to click on some portion of that window.  The window will be brought to the front and you can then interact with it.  If there are a large number of windows, or if the windows cover each other, this may be difficult.  Instead, click on Realizer's Window menu.  This will show you a list of all windows on the screen.  To bring a particular window to the front, just click on its name in this list.  If more than 9 windows appear on the screen, click on the More Windows command to see a list of all windows.

The windows are displayed in the Window menu in alphabetic order.  An arrow indicates which window is currently at the front.  Checkmarks indicate program windows with unsaved changes.


Opening a File

Opening a file creates a program editor window, and displays the file within it.  You can then edit or run the file.  Use the File Open command.


Saving a File

To save text from a program editor window or log to disk, select File Save.  If you have not yet saved the file, this will bring up a dialog box asking you for the name to use for the file.  Otherwise, it will save the file using its original name.

If you use the File Save As command instead of the Save command, you will always be prompted for the name of the file.  This saves the file using a different name.


Encrypting a File

To encrypt a file, press ALT+F1 and then type in the file name.  Once a file is encrypted, you cannot access its source code.  Thus, you should keep an unencrypted version in a different directory or save the encrypted version using a different file name.

The run-time version of Realizer can only run encrypted files.