Xbasic

Variable Functions

Description

Alpha Anywhere provides the following functions and methods for working with variables.

Name
Description
*PROPERTY_DIFFERENCE Function

Get the differences between two properties, store in difference pointer.

*summary_groups_enum Function

Return group contexts visible to variable frame - optional format can include $N-group name and $T-group type.

*variable_delegate Function

Delegate a variable.

*variable_name_normalize Function

Normalize characters in a variable name.

*variable_parent_restore Function

Remove variable frame parent override.

*variable_parent_set Function

Override a variable frames parent.

*variable_to_script Function

Create a script that would initialized the variables in the variable frame - option flag 'w' - generate with statements.

a5_cnvrt_dot_vars Function

Takes the sub elements of a dot variable and create standard variables in the specified namespace

a5_copy_ask_vars Function

Copies "ask" variable values from one session to another

a5_defaultvalue_get Function

Get a default value for a variable from the Registry (in the "Preferences\DefaultValueForVariable" key).

a5_defaultvalue_set Function

Set a default value for a variable in the Registry in the "Preferences\DefaultValueForVariable" key.

A5_DEFINE_GLOBAL_VARS Function

Brings up a dialog box to define Global Variables

A5_DELETE_SETTINGS Function

Deletes a saved setting. Setting created by a5_settings(). Record name is 'setting_name' and type is 'SAVU'.

a5_dim_ask_vars Function

DIMs a CRLF delimited list of ask variables

A5_EXPORT_PROPS_TO_CMDS Function

Creates Xbasic commands to initialize a dot-variable. Used in Xdialog code generator

a5_extract_ask_vars Function

Returns a CRLF delimited list of ASK variables.

a5_get_var_names Function

For use in the Script Genie. Returns a CRLF delimited list of variable names|type that can be used in the Genie. Var_types filters the list a=alltypes, c=char, cn=char and numeric etc.

a5_is_var_name_valid Function

Returns .t. if a variable name does not contain any invalid characters

a5_javascript_property_to_attribute Function

Converts a dot variable that contains Javascript events to a list of attributes.

a5_list_user_vars Function

List all of the user defined variables in the specified variable frame

A5_LOAD_SETTINGS Function

Reads the contents of a setting in a dictionary into a 'dot_variable'. Setting created by A5_SAVE_SETTINGS(). Record name is 'setting_name' and type is 'SAVU'.

a5_prompt_for_ask_vars Function

Prompt for ask variables contained in a CRLF, or comma, delimited list of Ask Variables

a5_property_to_arguments Function

Converts a dot variable to SQL Arguments, setting the argument name to match the variable name, and the 'data' to contain the variables value.

a5_property_to_attribute Function

Converts a dot variable to a list of attributes.

A5_SAVE_SETTINGS Function

Saves the contents of 'dot_variable' to a record in the dictionary. Record name is 'setting_name' and type is 'SAVU'.

a5w_resolvevariablesinoverridesettings Function

Used inside an a5w page to replace session and page variables in the .override_settings string.

all_variables Function

Return all scoped variables in the context.

CANCEL Function

Cause script to cancel the calling operation (if supported by Trigger).

dotVarGet Function

Gets the value of a property from a dot variable using the property name as a string.

dotVarSet Function

Sets the value of a property on a dot variable using the property name as a string.

getenvironmentvariable Function

Returns the value of the requested environment variable or "" if not set.

global_variables Function

Gets the global variable frame.

LOCAL_VARIABLES Function

Gets the local variable frame, used to pass local script variables down to other functions.

Merge_Variable_Frames Function

Merges the variables from one variable frame into another variable frame.

PROP_VALID Function

Tests whether a dot variable has a specified property

PROPERTIES_ENUM Function

Returns CR-LF serarated property list.

PROPERTY_FROM_STRING Function

Recover previously dumped contents back into a pointer, format allows for optional user spec.

PROPERTY_RECURSE_ASSIGN Function

Recursive property assignment (for propagating properties instead of referencing them).

PROPERTY_TO_STRING Function

Dump pointer contents (can be variable frame) to a string - (impose optional limit on length of leaf data).

propertyfromquerystring Function

Converts a query string to a dot variable. Example: name=Jim&city=Boston&age=23

REPLACE_VARIABLES_IN_STRING Function

Replaces variables in a string with their actual values. If expression_mode = .t. then creates valid Xbasic expression. E.g. mydate = {12/12/2005}

SESSION_VARIABLES Function

Gets a sessions variable frame.

SHOWVAR Function

Display the contents of a variable

submit_let Function

Submit a variable value to another running session.

variable_exists Function

Return true if a variable exists.

variable_name_normalize Function

Makes a suggested variable name into a valid variable name. E.g '0first name' becomes 'v0first_name'

Additional Methods for Working with Variables

The following functions are also useful for working with variables