TOC PREV NEXT INDEX

V commands

V commands perform special operations. For example, $print prints an object's definition. $include includes a V file. #define allows you to define conditional code.

Summary of commands by category

Here is a summary of V commands by category. Commands that appear as a group, with the first command not indented and the others indented, are documented together under the first command.

Category

Command

Description

Printing/saving an object's definition.

$print
___$dprint
$save _
$save_usr

Print/save an object's definition.

Printing an object's value.

$int
___$ptr
$real
$str
$get_array
___$sub_array

Print a scalar data object's value.



Print an array object's value.

Printing/setting object references.

$link
$obj_pval
$obj_val
$obj_ref
$get_array_ref
$refcnt
$refs_to

Connect objects.
Print connected objects.



Print number of references to object.
Print objects connected to.

Printing/setting other object characteristics

$array_dims
___$array_size
$get_data_type
$get_obj_att
$get_obj_prop
$obj_path
$set_data_type
$set_obj_name
$user_template
$move

Print array dimensions and size.

Print data type.
Print an attribute.
Print a property.
Print full pathname.
Set data type.
Set name.
Print object's template name.
Moves an object in the hierarchy.

Listing subobjects

$list

List immediate subobjects.

Validating and debugging

$cur_seq,
$obj_seq
$obj_seq_base
$obj_seq_ptrs
$echo
$obj_id
$match
$ematch
$notify
$deps
$resolve
$set_trace
$unset_trace
$set_verbose
$unset_verbose
$valid
$obj_proc

Print sequence number.



Echo string.
Print object's id and process id.
Test whether objects match.

List notifications on an object.
List dependencies for a method.
Resolve object references.
Trace certain events.

Execute in verbose mode.

Test whether object has valid value.
Get process id of an object.

Controlling execution

$pause
$push
$pop

Pause execution.
Delay delivery of events.

Including V files

$include

Include a V file.

Making code conditional

#define
#undef
#ifdef
#else
#endif

Conditionally parse a block of V code.

Others

$help
$open
$quit
$local_quit
$compile
$generate
$type
$server_info
$shell
$timer_start
timer_get
$set_file_env

Print V-command help.
Parse a buffered object.
Quit AVS/Express.
Quit local process only.
Compile an object.
Generate code for an object.
Print AVS/Express base types.
Print server information.
Execute a shell command.
Get timing information.

Make an environment variable accessible as an AVS/Express file variable.

General coding rules

Format

Commands consist of a command name followed by zero or more arguments. Commands always begin with a $ character (except for the #define command). Commands do not end with a semicolon.

No continuation lines

Commands can start anywhere on a line, but cannot be split across lines.

Separators

A command name and each of its arguments must be space- or tab-separated.

Case sensitive

AVS/Express is case sensitive. $print is a command, but $Print is not.

Specifying an object name

Most commands take an optional object name as one of their arguments:

Default object -- The object name is usually optional, and defaults to the current object. In the syntax diagram for an object, optional arguments appear in brackets. For example: $print [object].

Subobjects -- When you do specify an object name, you must reference a subobject of the current object. To refer to an immediate subobject, specify an unqualified name. To refer to a lower-level subobject, either navigate to the object before issuing the command, or specify a pathname.

Redirecting output to a file

You can redirect any command's output to a file, by specifying UNIX-style redirection at the end of the command. This is valid on Windows systems as well.

The following example redirects the output of the $save command to a file. Since $save prints an object's V definition, the command with redirection saves the object's V definition to a file, and is equivalent to the File->Save Object pull-down command in the Network Editor:

$save myapp > myV/myapp.v

The default directory is the directory in which AVS/Express started.


TOC PREV NEXT INDEX