UPDATE [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
UPDATE
The UPDATE statement assigns a value to the current datum of a specified
BASIC DATA file, if the assignment is legal. The UPDATE statement cannot
change the type of the datum, and it cannot change the length of a string
datum.
Syntax
UPDATE #fnum; expr
Parameters
fnum The file number that HP Business BASIC/XL uses to
identify the BASIC DATA file. It is a numeric
expression that evaluates to a positive short integer.
expr Its value is assigned to the current datum or the datum
indicated by the file's datum pointer if the assignment
is legal.
If the new value is not of the same type as the old
value, the UPDATE statement converts the new value to
the old type. If this is impossible, an error occurs.
If expr is a string, and it is shorter than the string
that it replaces, it is blank-filled on the right. If
expr is a string that is longer than the string that it
replaces, it is truncated on the right.
Examples
The following statements show the update statement.
10 UPDATE #1; 1234 !Updates #1
20 UPDATE #2; "CAT" !Updates #2
30 UPDATE #3; SIN(X+35) !Updates #3 with the results of a function
40 UPDATE #3; LWC$("JOHN " + "DOE") !Updates #4 with "john doe"
MPE/iX 5.0 Documentation