Catalog of Functionality > PV-WAVE Foundation > Programming
  

Programming
Data Conversion Routines
BYTE
Converts an expression to byte data type.
BYTSCL
Scales and converts an array to byte data type.
COMPLEX
Converts an expression to complex data type.
DCOMPLEX
Converts an expression to double-precision complex data type.
DOUBLE
Converts an expression to double-precision floating-point data type.
FIX
Converts an expression to integer data type.
FLOAT
Converts an expression to single-precision floating-point data type.
INT32
Converts an expression to longword integer data type.
INTEGER_TO_HEX
Converts an integer to a string containing the hexadecimal representation.
LONG
Converts an expression to longword integer data type.
NINT
Converts input to the nearest integer.
SCL
Emulates BYTSCL function but for all data types.
SCLNONLIN
Performs general scaling of array values (generalizes SCL).
STRING
Converts the input parameters to characters and returns a string expression.
TYPECONV
Converts data types for numeric arrays.
Data Extraction Routines
BYTE
Extracts data from an expression and places it in a byte scalar or array.
COMPLEX
Extracts data from an expression and places it in a complex scalar or array.
DCOMPLEX
Extracts data from an expression and places it in a complex scalar or array.
DOUBLE
Extracts data from an expression and places it in a double- precision floating-point scalar or array.
FIX
Extracts data from an expression and places it in a integer scalar or array.
FLOAT
Extracts data from an expression and places it in a single- precision floating-point scalar or array.
INT32
Extracts data from an expression and places it in a longword integer scalar or array.
LONG
Extracts data from an expression and places it in a longword integer scalar or array.
Date/Time Functions
CREATE_HOLIDAYS
Creates the system variable !Holiday_List.
CREATE_WEEKENDS
Creates the system variable !Weekend_List.
DAY_NAME
Returns a string array containing the name of the day of the week for each day in a Date/Time variable.
DAY_OF_WEEK
Returns an array of integers containing the day of the week for each date in a Date/Time variable.
DAY_OF_YEAR
Returns an array of integers containing the day of the year for each date in a Date/Time variable.
DT_ADD
Increment the values in a Date/Time variable by a specified amount.
DT_COMPRESS
Identifies previously defined weekends and/or holidays within an array of date/time variables.
DT_DURATION
Determines the elapsed time between two Date/Time variables.
DT_PRINT
Prints the values of PV‑WAVE  Date/Time variables in a readable manner.
DT_SUBTRACT
Decrements the values in a Date/Time variable by a specified amount.
DT_TO_SEC
Converts PV‑WAVE  Date/Time variables to double-precision variables containing the number of seconds elapsed from a base date.
DT_TO_STR
Converts PV‑WAVE  Date/Time variables into string data.
DT_TO_VAR
Converts a PV‑WAVE  Date/Time variable to regular numerical data.
DTGEN
Returns an array of PV‑WAVE  Date/Time variables beginning from a specified date and incremented by a specified amount.
JUL_TO_DT
Converts a Julian day number to a PV‑WAVE  Date/Time variable.
LOAD_HOLIDAYS
Passes the value of the !Holiday_List system variable to the Date/Time routines.
LOAD_WEEKENDS
Passes the value of the !Weekend_List system variable to the Date/Time routines.
MONTH_NAME
Returns a string or array of strings containing the names of the months contained in a Date/Time variable.
SEC_TO_DT
Converts any number of seconds into PV‑WAVE  Date/Time variables.
STR_TO_DT
Converts date and time string data to PV‑WAVE  Date/Time variables.
TODAY
Returns a Date/Time variable containing the current system date and time.
VAR_TO_DT
Converts scalars or arrays of scalars representing dates and times into PV‑WAVE  Date/Time variables.
File Manipulation Routines
CLOSE
Closes the specified file units.
EOF (unit)
Tests the specified file unit for the end-of-file condition.
FINDFILE
Returns a string array containing the names of all files matching a specified file description.
FLUSH
Causes all buffered output on the specified file units to be written.
FREE_LUN
Deallocates file units previously allocated with GET_LUN.
FSTAT
Returns an expression containing status information about a specified file unit.
LFSTAT
Returns an expression containing status information about a specified file unit. Used for large files (>2.5 gigabytes).
GET_LUN
Allocates a file unit from a pool of free units.
LFPOINT_LUN
Allows the current position of the specified file to be set to any arbitrary point in the file. This routine is for large files (>2.5 gigabytes on supported platforms only).
OPENR
OPENR (OPEN Read) opens an existing file for input only.
OPENU
OPENU (OPEN Update) opens an existing file for input and output.
OPENURL
Opens a file on the internet to be accessed using PV‑WAVE. 1
OPENW
OPENW (OPEN Write) opens a new file for input and output.
PARSEFILENAME
Extracts specified parts of a full file pathname.
POINT_LUN
Allows the current position of the specified file to be set to any arbitrary point in the file.
Help and Information Routines
DOCS
Standard Library function that displays the header contents of
PV-WAVE .pro files within a WgTextTool
HELP
Starts the online help system.
INFO
Displays information on many aspects of the current PV‑WAVE  session.
PWD
Prints the current default directory.
STRUCTINFO, structure
Gathers information about the tags of a PV-WAVE structure variable.
Operating System Access Routines
CALL_UNIX
(UNIX Only)  Lets a PV‑WAVE  procedure communicate with an external routine written in C.
CD
Changes the current working directory.
DEL_FILE
Deletes a specified file on your system.
ENVIRONMENT
(UNIX Only)  Returns a string array containing all the UNIX environment strings for the PV‑WAVE  process.
GETENV
Returns the specified equivalence string from the environment of the PV‑WAVE  process.
LINKNLOAD
Provides simplified access to external routines in shareable images.
GETPLATFORM
Returns a string identifying the host platform.
POPD
Standard Library procedure that pops a directory from the top of a last-in, first-out directory stack.
PRINTD
Standard Library procedure that lists the directories located in the directory stack, and the current working directory.
PUSHD
Standard Library procedure that pushes a directory onto the top of a last-in, first-out directory stack.
SETENV
Adds or changes an environment string in the process environment.
SPAWN
(UNIX only) Spawns a child process to execute a given command.
SPAWN
(Windows) Spawns a child process to execute a given command.
SYSTIME
Returns the current system time as either a string or as the number of seconds elapsed since January 1, 1970.
WIN32_locale
Creates a window for the display of graphics or text.
WIN32_PICK_PRINTER
Displays a Windows printer dialog.
WIN32_PICK_FONT
Displays a Windows common font dialog.
Profiling Tools
TIMECMND
Estimates the typical runtime for a given command.
SYSTIME
Returns the current system time as either a string or as the number of seconds elapsed since January 1, 1970.
Programming Routines
ADDVAR, name, local
Creates a variable on the $MAIN$ program level and binds a local variable to it.
BREAKPOINT, file, line
Lets you insert and remove breakpoints in programs for debugging.
CHECKFILE( filename )
Determines if a file can be read from or written to.
CHECK_MATH ([print_flag, message_inhibit])
Returns and clears the accumulated math error status.
DEFINE_KEY, key [, value]
Programs a keyboard function key with a string value, or with a specified action.
DEFSYSV, name, value [, read_only]
Creates a new system variable initialized to the specified value.
DELCOM, blocknamei ,..., blocknamen
Deletes one or more COMMON blocks from the PV-WAVE session.
DELFUNC, functioni ,..., functionn
Deletes one or more compiled functions from memory.
DELPROC, procedurei ,..., proceduren
Deletes one or more compiled procedures from memory.
DELSTRUCT, structurei ,..., structuren
Deletes one or more named structure definitions from memory.
DELVAR, v1, ... ,vn
Deletes variables from the main program level.
ERRCHECK
Provides comprehensive error checking that can be used by any
PV-WAVE routine.
EXIT
Exits PV‑WAVE  and returns you to the operating system.
FINITE (x)
Returns a value indicating if the input variable is finite or not.
HAK
Standard Library procedure that lets you implement a “hit any key to continue” function.
KEYWORD_SET (expr)
Tests if an input expression has a nonzero value.
MESSAGE, text
Issues error and informational messages using the same mechanism employed by built-in PV‑WAVE  routines.
N_ELEMENTS (expr)
Returns number of elements contained in any expression or variable.
N_PARAMS ( )
Returns the number of non-keyword parameters used in calling a PV‑WAVE  procedure or function.
N_TAGS (expr)
Returns the number of structure tags contained in any expression.
OMPTUNE, nmb, output_file_name
Tests and records platform-specific parallel-performance for a representative subset of all possible PV-WAVE array operations.
ON_ERROR, n
Determines the action taken when an error is detected inside a PV‑WAVE  user-written procedure or function.
ON_ERROR_GOTO, label
Specifies a statement to jump to if an error occurs in the current procedure.
ON_IOERROR, label
Specifies a statement to jump to if an I/O error occurs in the current procedure.
PARAM_PRESENT (parameter)
Tests if a parameter was actually present in the call to a procedure or function.
PARSEFILENAME (pathname)
Extracts specified parts of a full file pathname.
RENAME, variable, new_name
Renames a PV‑WAVE variable.
RETALL
Issues RETURNs from nested routines. Used primarily to recover from errors in user-written procedures and functions.
RETURN [, expr]
Returns control to the caller of a user-written procedure or function.
SAME(x, y)
Tests if two variables are the same.
SET_OMP
Sets the run-time OpenMP parameters for shared-memory, multi-processor machines running supported operating systems.
SIZE (expr)
Returns a vector containing size and type information for the given expression.
SIZEOF (expr)
Returns the data size in bytes of the given expression.
STOP [, expr1,... , exprn]
Stops the execution of a running program or batch file, and returns control to the interactive mode.
STRMESSAGE (errno)
Returns the text of the error message specified by the input error number.
STRUCTINFO, structure
Gathers information about the tags of a PV-WAVE structure variable.
STRUCTNAME ({structure})
Returns the name of a structure if the input variable name is of type structure.
STRUCTREF ({structure})
Returns a list of all existing references to a structure.
TAG_NAMES (expr)
Returns string array containing names of tags in a structure expression.
UPVAR, name, local
Accesses a variable that is not on the current program level.
VAR_MATCH( )
Standard Library function that scans for PV‑WAVE variables that match the given criteria.
WAIT, seconds
Suspends execution of a PV‑WAVE  program for a specified period.
 
Assignment, Array, Numeric, and String Operators
Parentheses ( )
Groups expressions and encloses subscript and function parameter lists.
Assignment Operator =
The value of the expression on the right side of the equal sign is stored in the variable, subscript element, or range on the left side.
Addition Operator +
Besides arithmetic addition, the addition operator concatenates the strings.
Subtraction Operator –
Besides subtraction, the minus sign is used as the unary negation operator.
Array Subscripting
Subscripts provide a means of selecting one or more elements of an array variable.
Multiplication Operator *
Multiplies two operands.
Division Operator /
Divides two operands.
Exponentiation Operator ^
A^B is equal to A to the B power. If B is of integer type, repeated multiplication is applied, otherwise the formula AB = e B logA is used. 0^0 is undefined for all operands.
Matrix Multiplication Operator #
The rules of linear algebra are followed:
MOD
Modulo operator.
Array Concatenation Operators [ ]
Operands enclosed in square brackets and separated by commas are concatenated to form larger arrays.
Boolean Operators
AND
AND is the Boolean operator for logical conjunction.
NOT
NOT is the Boolean complement operator.
OR
OR is the Boolean inclusive operator.
XOR
The Boolean exclusive “or” function. XOR is only valid for all integer operands.
Relational Operators
Minimum Operator <
The value of A < B is equal to the smaller of A or B.
Maximum Operator >
A > B is equal to the larger of A or B.
EQ
EQ returns true if its operands are equal, otherwise it is false.
GE
GE is the greater than or equal to relational operator. GE returns true if the operand on the left is greater than or equal to the one on the right.
GT
Greater than relational operator.
LE
Less than or equal to relational operator.
LT
Less than relational operator.
NE
NE is the not equal to relational operator. It is true whenever the operands are not of equal value.
Session Routines
INFO
Displays information on many aspects of the current PV‑WAVE  session.
JOURNAL
Provides a record of an interactive session by saving in a file all text entered from the terminal in response to a prompt.
RESTORE
Restores the PV‑WAVE  objects saved in a file by the SAVE procedure.
SAVE
Saves variables in a file for later recovery by RESTORE.
String Processing Routines
STRCOMPRESS
Compresses the white space in an input string.
STR_IS_NUM
Determines if a string contains a numerical value.
STRJOIN
Concatenates all elements of a string array into a single scalar string.
STRLEN
Returns the length of the input parameter.
STRLOOKUP
Queries, creates, saves, or modifies a string server database.
STRLOWCASE
Converts a copy of the input string to lowercase letters.
STRMATCH
Matches a specified string to an existing regular expression.
STRMID
Extracts a substring from a string expression.
STRPOS
Searches for the occurrence of a substring within an object string, and returns its position.
STRPUT
Inserts the contents of one string into another.
STRSPLIT
Splits a string into an array of tokens (substrings).
STRSUBST
Performs string substitution (search and replace).
STRTRIM
Removes extra blank spaces from an input string.
STRUPCASE
Converts a copy of the input string to uppercase letters.
Table Manipulation Functions
BUILD_TABLE
Creates a table from one or more vectors (one-dimensional arrays).
GROUP_BY
Performs summary (aggregate) functions to groups of rows in a PV‑WAVE table variable.
ORDER_BY
Sorts the rows in a PV‑WAVE table variable to create a new table.
QUERY_TABLE
Subsets a table created with the BUILD_TABLE function.
UNIQUE
Returns a vector (one-dimensional array) containing the unique elements from another vector variable.
Interprocess Communication
SOCKET_ACCEPT
Waits for a connection on a socket.
SOCKET_CLOSE
Closes a socket connection.
SOCKET_CONNECT
Connects to a socket at a given host and port.
SOCKET_GETPORT
Returns the socket port number for the specified socket connection.
SOCKET_INIT
Binds a socket to a specified port that is designated to listen for client connections.
SOCKET_READ
Reads data from a socket connection.
SOCKET_WRITE
Writes data to a socket connection.
SSL_CLIENT_CLOSE
Closes an SSL connection and frees the local resources.
SSL_CLIENT_CONNECT
Initializes the OpenSSL library and establishes a connection with a remote HTTPS server.
SSL_CLIENT_READ
Reads a BYTE array from a connection with an SSL-enabled HTTP server.
SSL_CLIENT_WRITE
Writes a PV-WAVE STRING to an established SSL connection.
SSL_CONNECT_LOAD
Loads the SSL_connect OPI into your PV-WAVE session.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.