Supported On | UX WS DOS IN |
Option Required | IO |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ABORT terminates I/O activity on the specified HP-IB interface.
ABORT 7
ABORT Isc
IF Stop_code THEN ABORT @Source
Item | Description | Range |
---|---|---|
interface select code | numeric expression, rounded to an integer | 5, 7 through 31 |
I/O path name | name assigned to an HP-IB interface | -- |
Do not use this statement to specify other types of interfaces. Error 150 results if you specify a select code for any other type of interface.
If the computer is the system controller but not currently the active controller, executing ABORT causes the computer to assume active control.
Note that ABORT interface_select is allowed, but ABORT primary_address is not. For example:
ABORT 7 allowed
ABORT 721 not allowed
The details of interface select codes and primary addresses are introduced in the "Data Flow" chapter of the HP BASIC Programming Guide.
System Controller | Not System Controller | |
---|---|---|
Active Controller | IFC (duration >= µsec)
REN ATN |
ATN
MTA UNL ATN |
Not Active Controller | IFC (duration >=100 µsec)1
REN ATN |
No
Action |
1 The IFC message allows a non-active controller (which is the system controller) to become active.
Supported On | UX WS DOS |
Option Required | TRANS |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ABORTIO terminates a TRANSFER which is taking place through an I/O path assigned to a device, group of devices, mass storage file, or pipe in HP BASIC/UX.
ABORTIO @Isc
IF Stop_flag THEN ABORTIO @Device
Item | Description | Range |
---|---|---|
I/O path name | name assigned to a device, a group of devices, mass storage file, or pipe | any valid name |
This statement terminates a TRANSFER (in either direction) currently taking place through the specified I/O path name. The specified I/O path must correspond to one of the following:
If ABORTIO is used for I/O paths assigned to buffers, error 170 is reported.
An end-of-transfer (EOT) branch is initiated if an ON EOT branch is currently defined for the I/O path name; however, no currently defined EOR branch is initiated.
ABORTIO has no effect if no TRANSFER is taking place through the I/O path name.
If a TRANSFER to or from an I/O path name was terminated by an error, executing ABORTIO on that I/O path name causes the error to be reported.
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ABS returns the absolute value of its argument.
Magnitude=ABS(Vector)
PRINT "Value =";ABS(X1)
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | within valid ranges of INTEGER and REAL data types for INTEGER and REAL arguments. See Range Restriction Specifics for COMPLEX arguments |
To compute the absolute value of a COMPLEX value, the COMPLEX binary must be loaded.
The formula for computing ABS for COMPLEX arguments is:
SQRT(Real_part*Real_part + Imag_part*Imag_part)
where Real_part is the real part of the COMPLEX argument and Imag_part is the imaginary part of the COMPLEX argument in the ABS function. Some values of a COMPLEX argument may cause errors in this computation. For example:
ABS(CMPLX(MAXREAL,MAXREAL))
will cause error 22 (error 21 in HP BASIC/UX 700) due to the computation Real_part*Real_part.
The result returned when executing the ABS function for COMPLEX numbers is always a positive REAL value.
Taking the ABS of the INTEGER -32768 will cause an error.
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ACS returns the arccosine of its argument.
Angle=ACS(Cosine)
PRINT "Angle = ";ACS(CMPLX(2.67,-6))
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | -1 through +1 for INTEGER and REAL arguments. See Range Restriction Specifics below for COMPLEX arguments and underflow conditions. |
If the argument of ACS is REAL or INTEGER, the value returned is REAL. If the argument is COMPLEX, the value returned is COMPLEX. To compute the ACS of a COMPLEX value, the COMPLEX binary must be loaded.
The angle mode (set by RAD or DEG) determines whether the value returned is in degrees or radians. If the current angle mode is DEG, the range of the result is 0 to 180 degrees. If the current angle mode is RAD, the range of the result is 0 to PI radians. The angle mode is radians unless you specify degrees with the DEG statement.
The formula used for computing the ACS of a COMPLEX value is:
-i * LOG(Argument+SQRT(Argument*Argument-1))
where i is the COMPLEX value CMPLX(0,1) and Argument is a COMPLEX argument to the ACS function. Some values of a COMPLEX argument may cause errors in this computation. For example,
ACS(CMPLX(MAXREAL,0))
will cause error 22 (error 21 in HP BASIC/UX 700) due to the Argument*Argument computation. Also, the COMPLEX argument
ACS(CMPLX(MINREAL,0))
will cause error 21 in HP BASIC on Series 700 due to underflow if the underflow mode is set to Error. The principle value, which has a real part between 0 and ( radians, is returned for COMPLEX arguments.
The following range restrictions apply in HP BASIC/UX 700 when underflow mode (CONTROL 32,7;mode) is set to Error or Ignore.
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +1.00000000000000E+000 | +1.00000000000000E+000 |
Negative Minimum | -1.00000000000000E+000 | -1.00000000000000E+000 |
Positive Minimum | +5.11091385101442E-103 | +4.94065645841247E-3241 |
Negative Maximum | -5.11091385101442E-103 | -4.94065645841247E-3242 |
1An underflow in Ignore mode results in a denormalized number that is less than the value for +MINREAL.
2An underflow in Ignore mode results in a denormalized number that is greater than the value for -MINREAL.
Supported On | UX WS DOS |
Option Required | COMPLEX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ACSH returns the hyperbolic arccosine of its argument.
Result=ACSH(5.7089)
PRINT "Hyperbolic Arccosine = ";ACSH(Expression)
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | INTEGER and REAL arguments must be >1 and <1.340 780 792 99 E 154; see "Range Restriction Specifics" for COMPLEX arguments and underflow conditions. |
If an INTEGER or REAL argument is given, this function returns a REAL value. If a COMPLEX argument is given, this function returns a COMPLEX value.
The formula for computing ACSH is as follows:
LOG(Argument+SQRT(Argument*Argument-1))
where Argument is the argument to the ACSH function. Some values of an argument may cause errors in this computation. For example,
ACSH(MAXREAL)
will cause error 22 (error 21 in HP BASIC/UX 700) due to the computation Argument*Argument.
Note that the hyperbolic arccosine of a COMPLEX number returns a principle value which has an imaginary part which falls in the range of 0 to positive PI.
The following range restrictions apply in HP BASIC/UX 700 when underflow mode (CONTROL 32,7;mode) is set to Error or Ignore.
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +1.34078079299426E+154 | +1.34078079299426E+154 |
Positive Minimum | +1.00000000000000E+000 | +1.00000000000000E+000 |
Supported On | UX WS DOS |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ALLOCATE dynamically allocates memory for arrays and string variables during program execution.
ALLOCATE Temp(Low:High)
ALLOCATE INTEGER Array(Index,2,8)
ALLOCATE R$[LEN(A$)+1]
ALLOCATE Text$(Lines)[80]
Item | Description | Range |
---|---|---|
array name | name of a numeric array | any valid name |
lower bound | numeric expression, rounded to an integer; Default = OPTION BASE value (0 or 1) | -32 768 through +32 767 (see array in Glossary) |
upper bound | numeric expression, rounded to an integer | -32 768 through +32 767 (see array in Glossary) |
string name | name of a string variable | any valid name |
string length | numeric expression, rounded to an integer | 1 through 32 767 |
Memory reserved by the ALLOCATE statement can be freed by the DEALLOCATE statement. However, because of the stack discipline used when allocating, the freed memory space does not become available unless all subsequently allocated items are also deallocated. For example, assume that A$ is allocated first, then B$, and finally C$. If a DEALLOCATE A$ statement is executed, the memory space for A$ is not available until B$ and C$ are deallocated. This same stack is used for setting up ON-event branches, so subsequent ON-event statements can also block the availability of deallocated memory.
The total number of elements that can be allocated for variables within any one context or COM area (i.e., any "value area") is limited to 16 777 215 bytes.
The variables in an ALLOCATE statement cannot appear in the same context in declaration statements such as COM, DIM, or INTEGER. If variable(s) are to be allocated in a subprogram, the variable(s) cannot have been included in the subprogram's formal parameter list. Implicitly declared variables cannot be allocated. Numeric variables for which a type is not specified are assumed to be REAL. A variable can be re-allocated in its program context only if it has been deallocated and its type and number of dimensions remain the same.
ALLOCATE allows you to dynamically allocate memory for arrays. However, the array dimensions are determined statically. Thus you can change the size of the dimensions, but you cannot change the number of dimensions of an array within a program context.
Exiting a subprogram automatically deallocates any memory space allocated within that program context.
ALLOCATE can be executed from the keyboard while a program is running or paused. However, the variable must have been declared in an ALLOCATE statement in the current program context.
Supported On | UX WS DOS |
Option Required | CRTX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ALPHA HEIGHT sets the number of lines of text visible in the CRT's alpha area.
ALPHA HEIGHT Num_of_lines
ALPHA HEIGHT 18
IF Total_lines = 10 THEN ALPHA HEIGHT 18
ALPHA HEIGHT
Item | Description/Default | Range Restrictions |
---|---|---|
number of lines | numeric expression | (see Semantics) |
ALPHA HEIGHT is used to restrict the alpha screen to the bottom n lines of the display, leaving the upper part of the display for graphics. This can be used to prevent alpha from interfering with graphics.
The number of lines available for alpha on the CRT depends on which display is being used. The following are the upper limits for the ALPHA HEIGHT statement: 22, 25, 26, 30, 42, 48, 51, and 56. The lower limit is 9 in all cases (can be others in a windowing environment).
ALPHA HEIGHT without any parameters restores the default height (one of the upper limits mentioned above). The minimum argument to this statement is always 9; however, when you are in Edit mode the minimum alpha height is 14. Note that upon entering the Edit mode if the ALPHA HEIGHT is a value in the range of 9 to 13 it will be changed to 14 (in HP BASIC/UX, it will not be changed).
Note that the functionality of this statement can be achieved through CRT CONTROL register 13; however, you cannot execute the CONTROL statement without a parameter in order to get the default alpha height.
Supported On | UX* WS DOS* |
Option Required | GRAPH |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ALPHA turns the alphanumeric raster (but not graphics) on or off.
ALPHA ON
IF Graph THEN ALPHA OFF
Items sent to the PRINT area while the alpha display is off are placed in the display memory even though they are not visible. Items sent to the keyboard input line, the DISP line, or the system message line will turn ALPHA ON. The alphanumeric and graphic rasters can both be on at the same time.
The alphanumeric area is enabled after power-on, RESET, and SCRATCH A. Pressing the [ALPHA] key on the keyboard also enables the alphanumeric raster.
This statement has no effect on a bit-mapped alpha display when the alpha write-enable mask specifies all planes. This is the default state on those displays.
If ALPHA MASK <> 2^n-1, then planes enabled for alpha can be turned on and off. See SET ALPHA MASK in this reference for more information.
ALPHA ON and ALPHA OFF have no effect in a windowing environment or on single bit-plane terminals. It functions the same, however, on a bit-mapped console.
ALPHA ON and ALPHA OFF functions only in SEPARATE ALPHA mode, which is supported only for VGA and EGA displays.
Supported On | UX WS DOS |
Option Required | CRTX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ALPHA PEN sets the color or gray scale of text in the alphanumeric display.
ALPHA PEN Pen_value
ALPHA PEN 142
IF Cyan THEN ALPHA PEN 140
Item | Description/Default | Range Restrictions |
---|---|---|
pen value | numeric expression | (see Semantics) |
The set of alpha colors for the Model 236C is given in the following table:
Value | Result |
---|---|
16 | The number is evaluated MOD 8 and resulting values produce the following:
0 -- black 1 -- white 2 -- red 3 -- yellow 4 -- green 5 -- cyan 6 -- blue 7 -- magenta |
16 to 135 | Ignored |
136 | White |
137 | Red |
138 | Yellow |
139 | Green |
140 | Cyan |
141 | Blue |
142 | Magenta |
143 | Black |
144 to 255 | Ignored |
This statement has no effect on single plane monochrome displays. On gray scale (multi-plane monochrome) displays this statement changes the display color to a different shade of gray.
For bit-mapped alpha displays, ALPHA PEN specifies the pen to be used for subsequent alpha output. The range of values allowed with this statement are 0 through 255; these values are treated as MOD 2^n, where n is the number of display planes.
ALPHA PEN n or CONTROL CRT,5; n set the values of the CRT registers 15, 16, and 17 (or PRINT PEN, KEY LABELS PEN and KBD LINE PEN, respectively), but the converse is not true. That is, STATUS CRT,5 may not accurately reflect the CRT state if control registers 15, 16, and/or 17 have been set.
Note that the functionality of this statement can be achieved through CRT CONTROL register 5.
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
AND returns a 1 or a 0 based on the logical AND of its two arguments.
IF Flag AND Test2 THEN Process
Final=Initial AND Valid
A non-zero value (positive or negative) is treated as a logical 1; only zero is treated as a logical 0.
A | B | A AND B |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
See ASSIGN, DUMP DEVICE IS, PLOTTER IS, PRINTALL IS, and PRINTER IS.
Supported On | UX WS DOS |
Option Required | GRAPHX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
AREA defines or selects an area fill color. The fill color is used in all subsequent graphics operations requiring area fill.
AREA COLOR Hue,Saturation,Luminosity
AREA INTENSITY Red(I),Green(I),Blue(I)
AREA PEN 3
Item | Description | Range |
---|---|---|
hue | numeric expression | 0 through 1 |
saturation | numeric expression | 0 through 1 |
luminosity | numeric expression | 0 through 1 |
red | numeric expression | 0 through 1 |
green | numeric expression | 0 through 1 |
blue | numeric expression | 0 through 1 |
pen selector | numeric expression, rounded to an integer | -32 768 through +32 767 |
The default fill color is the color specified by pen 1. This color is solid white after power-up, SCRATCH A, GINIT. It is also set to white after LOAD BIN "GRAPH" when this binary is not already resident in memory.
A fill color remains in effect until the execution of an AREA, GINIT, or SCRATCH A. Other statements which may alter the current fill color (if the data passed to them is an array) are:
SET PEN affects pen colors, and therefore can also affect fill colors specified with AREA statements.
Specifying color with the SET PEN and AREA PEN statements (resulting in non-dithered color) results in a much more accurate representation of the desired color than the same color requested with an AREA COLOR or AREA INTENSITY statement.
A fill color specified with AREA PEN is guaranteed to be non-dithered, and the AREA PEN statement executes faster than AREA COLOR or AREA INTENSITY.
The pen numbers have the same effect as described in the PEN statement for line color except that in the alternate pen mode, negative pens erase as in the normal pen mode; they do not complement. Pen 0 in normal pen mode erases; it does not complement.
When AREA COLOR executes on a computer with a color display, the HSL parameters are converted to RGB values. Then, if the color requested is not available in the color map, the computer creates the closest possible color in RGB color space to the one requested by filling the 4 by 4 dither cell with the best combination of colors from the color map.
In non-color map mode, there are eight colors total, and they cannot be redefined. This simulates the operation of the HP 98627A.
In color map mode, there are 2n total colors (where n is the number of planes in the graphics display), and they can be redefined with SET PEN.
The example program COLORS, on the MANUAL EXAMPLES disk, shows the effects of the AREA command. It shows the changes brought about by varying one of HSL parameters at a time. The bottom bar shows that when saturation (the amount of color) is zero, hue makes no difference, and varying luminosity results in a gray scale.
COLORS also displays a color wheel representing the colors selected as the hue value goes from 0 through 1. Any value between zero and one, inclusive, can be chosen to select color. The resolution (the amount the value can change before the color on the screen changes) depends on what the value of the hue is as well as the values of the other two parameters.
It then shows the effect that varying saturation and luminosity have on the color produced. Each of the small color wheels is a miniature version of the large one above, except it has fewer segments.
The example program COLORS, on the MANUAL EXAMPLES disk, demonstrates the effect of varying the intensity of one color component when the other two remain constant.
It also shows combinations of red, green and blue. The values are given in fifteenths: 0 fifteenths, 5 fifteenths, 10 fifteenths, and 15 fifteenths--every fifth value. The values for each color component are represented in that color.
When an HP98627A is used, the HSL values specified in an AREA COLOR statement are converted to RGB. The parameters of an AREA INTENSITY statement are already in RGB. The RGB values specify the fraction of dots per 4-by-4 pixel area to be turned on in each memory plane. The red value corresponds to memory plane 1, the green value to memory plane 2, and the blue value to memory plane 3.
The AREA PEN selects one of the eight non-dithered colors available with no intensity control on the color guns. See the PEN entry for the order of these colors.
The HP 98627A dithers in a very similar way to the Model 236 with color monitor when the color map is not enabled (see PLOTTER IS), using only eight colors when calculating the closest combination.
When doing shading on a monochromatic display, dithering is always used. Dithering takes place in a 4-by-4 cell, which allows zero through sixteen of the dots to be turned on, for a total of seventeen shades of gray.
Since AREA PEN does not use dithering, only black and white are available. If the pen selector is positive, the resulting fill color is white; if zero or negative, the resulting fill color is black.
When an AREA COLOR is executed, the hue and saturation parameters are ignored. Only the luminosity value is used to determine the fraction of pixels to be turned on.
When an AREA INTENSITY is executed, the largest of the three values is used, and it specifies the fraction of pixels to be turned on.
Gray scale displays provide various intensities of gray by actually adjusting the luminosity of each pixel. Refer to PEN and PLOTTER IS for gray scale tables. For additional information, refer to the chapter "Color and Gray Scale Graphics" in the BASIC Advanced Programming Techniques manual.
If the alternate drawing mode is in effect when the fill is performed, the area will be filled with non-dominant color. See GESCAPE operation selectors 4 and 5.
In the alternate pen mode, negative pens erase as in the normal pen mode; they do not complement.
For a VGA color display, the fill color selections are the same as for a Series 300 display. For an EGA display, the fill color selections are limited.
Supported On | UX WS DOS |
Option Required | COMPLEX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ARG returns the argument (the angle in polar coordinates) of a COMPLEX number.
X=ARG(Complex_expr)
Result=ARG(CMPLX(2.1,-8))
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | Any valid INTEGER, REAL, or COMPLEX value. See Semantics for underflow conditions. |
This is equivalent to ATN2(CMPLX(Imag_part,Real_part)) in FORTRAN. The value returned is REAL. If the current angle mode is DEG, the range of the result is -180° through +180°. If the current angle mode is RAD, the range of the result is -PI through +PI radians. The default mode is radians.
This function returns 0 when given an INTEGER or REAL argument.
The following range restrictions apply in HP BASIC/UX 700 when underflow mode (CONTROL 32,7;mode) is set to Error or Ignore.
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +1.79769313486232E+308 | +1.79769313486232E+308 |
Negative Minimum | -1.79769313486232E+308 | -1.79769313486232E+308 |
Positive Minimum | +2.22507385850720E-308 | +4.94065645841247E-324 1 |
Negative Maximum | -2.22507385850720E-308 | -4.94065645841247E-324 2 |
1An underflow in Ignore mode results in a denormalized number that is less than the value for +MINREAL.
2An underflow in Ignore mode results in a denormalized number that is greater than the value for -MINREAL.
See CREATE ASCII and LEXICAL ORDER IS.
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ASN returns the arcsine of its argument.
Angle=ASN(Sine)
PRINT "Angle = ";ASN(CMPLX(-2.98,3))
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | -1 through +1 for INTEGER and REAL arguments; see Range Restriction Specifics for COMPLEX arguments and underflow conditions. |
The angle mode (set by RAD or DEG) determines whether the value returned is in degrees or radians. If the current angle mode is DEG, the range of the result is -90 to +90 degrees. If the current angle mode is RAD, the range of the result is -PI/2 to +PI/2 radians. The angle mode is radians unless you specify degrees with the DEG statement.
If the argument is REAL or INTEGER, the value returned is REAL. If the argument is COMPLEX, the value returned is COMPLEX.
To compute the ASN of a COMPLEX value, the COMPLEX binary must be loaded.
The formula for computing the ASN of a COMPLEX value is:
-i*LOG(i*Argument+SQRT(1-Argument*Argument))
where i is the COMPLEX value CMPLX(0,1) and Argument is a COMPLEX argument to the ASN function. Some values of a COMPLEX argument may cause errors in this computation. For example:
ASN(CMPLX(MAXREAL,0))
will cause error 22 (error 21 in HP BASIC/UX 700) due to the Argument*Argument computation.
The principle value, which has a real part between -PI/2 to +PI/2~~ , is returned for COMPLEX arguments.
The following range restrictions apply in HP BASIC/UX 700 when underflow mode (CONTROL 32,7;mode) is set to Error or Ignore.
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +1.00000000000000E+000 | +1.00000000000000E+000 |
Negative Minimum | -1.00000000000000E+000 | -1.00000000000000E+000 |
Positive Minimum | +5.11091385101442E-103 | +4.94065645841247E-324 1 |
Negative Maximum | -5.11091385101442E-103 | -4.94065645841247E-324 2 |
1 An underflow in Ignore mode results in a denormalized number that is less than the value for +MINREAL.
2 An underflow in Ignore mode results in a denormalized number that is greater than the value for -MINREAL.
Supported On | UX WS DOS |
Option Required | COMPLEX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ASNH returns the hyperbolic arcsine of its argument.
Result=ASNH(-.2475)
PRINT "Hyperbolic Arcsine = ";ASNH(Expression)
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | absolute value
<1.340 780 792 99 E+154 and >1.491 668 146 24 E -154 for INTEGER and REAL arguments; see "Range Restriction Specifics" for additional restrictions. |
If an INTEGER or REAL argument is given, this function returns a REAL value. If a COMPLEX argument is given, this function returns a COMPLEX value.
The formula use for computing the ASNH is as follows:
LOG(Argument+SQRT(Argument*Argument+1))
where Argument is the argument to the ASNH function. Some values of a COMPLEX argument may cause errors in this computation. For example:
ASNH(CMPLX(MAXREAL,0))
will cause error 22 (REAL overflow) (error 21 in HP BASIC/UX 700) due to the Argument*Argument computation.
Note that the ASNH of a COMPLEX number returns a principle value which has an imaginary part that falls in the range of -PI/2 to +PI/2.
The following range restrictions apply in HP BASIC/UX 700 when underflow mode (CONTROL 32,7;mode) is set to Error or Ignore.
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +1.34078079299426E+154 | +1.34078079299426E+154 |
Negative Minimum | -1.34078079299426E+154 | -1.34078079299426E+154 |
Positive Minimum | +2.22507385850720E-308 | +4.94065645841247E-3241 |
Negative Maximum | -2.22507385850720E-308 | -4.94065645841247E-324 2 |
1An underflow in Ignore mode results in a denormalized number that is less than the value for +MINREAL.
2An underflow in Ignore mode results in a denormalized number that is greater than the value for -MINREAL.
Supported On | UX* WS DOS IN* |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
ASSIGN assigns an I/O path name and attributes to one of the following:
These statements assign an I/O path name to a file:
ASSIGN @File TO File_name$
ASSIGN @File TO File_name$; FORMAT OFF
ASSIGN @File TO File_name$; FORMAT OFF, SWAP OFF
ASSIGN @File TO * ! Close the file.
These statements assign an I/O path name to an instrument:
ASSIGN @Hpib_scope TO 724
ASSIGN @Serial_scope TO 9
ASSIGN @Buf_2 TO BUFFER Numeric_Array(*)
ASSIGN @Source;FORMAT ON
ASSIGN @Listeners TO 711,712,715
ASSIGN @File TO "/WORKSTATIONS/MyDir/MyFile:,700"
ASSIGN @Srm_file TO "P1/FredsData<pass>:REMOTE"
The following examples require the TRANS binary:ASSIGN @File TO Name$;APPEND
ASSIGN @Buf_1 TO BUFFER String_variable$
ASSIGN @Buf_2 TO BUFFER Numeric_Array(*)
The following examples require the IO binary:ASSIGN @Buf_3 TO BUFFER [128]
ASSIGN @Resource TO Gpio;WORD,CONVERT IN BY INDEX In$
ASSIGN @Resource;CONVERT OUT BY INDEX Out$
ASSIGN @Resource TO Hpib;EOL Eol$ END DELAY .05
The following examples require the LANGUAGE binary:ASSIGN @Resource TO Rs_232;PARITY ODD
ASSIGN @Printer TO 701;EXCHANGE "HP-16"
ASSIGN @Printer;EXCHANGE OFF
ASSIGN @Printer TO 701;EXCHANGE "JIS" SHIFT IN In$ OUT Out$
![]()
![]()
![]()
Item | Description | Range | |
---|---|---|---|
I/O path name | name identifying an I/O path | any valid name | |
device selector | numeric expression | (see Glossary) | |
file specifier | string expression | (see drawing) | |
string variable name | name of a string variable | any valid name (see Glossary) | |
numeric array name | name of a numeric array | any valid name | |
buffer size (in bytes) | numeric expression, rounded to an integer | 1 through available memory minus 690 | |
attribute | attribute to be assigned to the I/O path | (see drawing) | |
directory path | literal | (see MASS STORAGE IS) | |
file name | literal | depends on volume's format (see Glossary) | |
LIF protect code | literal; first two non-blank characters are significant | > not allowed | |
SRM password | literal; first 16 non-blank characters are significant | > not allowed | |
volume specifier | literal | (see MASS STORAGE IS) | |
conversion string | name of a string variable | up to 256 characters (with INDEX); even number of characters (with PAIRS) | |
end-of-line characters | string expression; Default=CR and LF | up to 8 characters | |
time period | numeric expression, rounded to the nearest 0.001 seconds; Default=0 | 0.001 through 32 767 | |
return variable name | name of a numeric variable | any valid name | |
exchange string | string expression | choices depend on LANGUAGE | |
shift in string | string expression | depends on printer used; six bytes maximum | |
shift out string | string expression | depends on printer used; six bytes maximum |
Resource | Default Attribute |
---|---|
interface/device | FORMAT ON |
ASCII file | (always ASCII format) |
BDAT file | FORMAT OFF |
DOS file | FORMAT OFF |
HP-UX file | FORMAT OFF |
buffer | FORMAT ON |
pipe | FORMAT ON |
Option | Effect on \Incoming Data | Effect on \Outbound Data |
---|---|---|
OFF | No check is performed | No parity is generated |
EVEN | Check for even parity | Generate even parity |
ODD | Check for odd parity | Generate odd parity |
ONE | Check for parity bit set (1) | Set parity bit (1) |
ZERO | Check for parity bit clear (0) | Clear parity bit (0) |
NOTE |
---|
SHIFT IN and SHIFT OUT cause Error 257 if used with HP-15 characters. Use EXCHANGE to convert HP-15 characters to your LANGUAGE two-byte characters |
Supported On | UX WS DOS IN |
Option Required | None |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
Angle=ATN(Tangent)
PRINT "Angle = ";ATN(CMPLX(-1.5,3.5))
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | within valid ranges of INTEGER or REAL data types for INTEGER and REAL arguments; see Range Restriction Specifics for COMPLEX arguments and underflow conditions. |
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +8.18773715074641E+076 | +1.79769313486232E+308 |
Negative Minimum | -8.18773715074641E+076 | -1.79769313486232E+308 |
Positive Minimum | +1.22133866975546E-077 | +4.94065645841247E-3241 |
Negative Maximum | -1.22133866975546E-077 | -4.94065645841247E-3242 |
Supported On | UX WS DOS |
Option Required | COMPLEX |
Keyboard Executable | Yes |
Programmable | Yes |
In an IF ... THEN ... | Yes |
Result=ATNH(-.4571)
PRINT "Hyperbolic Arctangent = ";ATNH(X1)
Item | Description/Default | Range\Restrictions |
---|---|---|
argument | numeric expression | -1 through +1 for INTEGER and REAL arguments; see Range Restriction Specifics for COMPLEX arguments and underflow conditions |
Range | Underflow Mode\Error | Underflow Mode\Ignore |
---|---|---|
Positive Maximum | +1.00000000000000E+000 | +1.00000000000000E+000 |
Negative Minimum | -1.00000000000000E+000 | -1.00000000000000E+000 |
Positive Minimum | +2.22507385850720E-308 | +4.94065645841247E-324 1 |
Negative Maximum | -2.22507385850720E-308 | -4.94065645841247E-3242 |
Supported On | UX WS DOS |
Option Required | GRAPH |
Keyboard Executable | Yes |
Programmable | Yes |
in an IF ... THEN ... | Yes |
AXES 10,10
AXES Xspace,Yspace
AXES Xspace,Yspace,Xlocy,Ylocx,Xmajor,Ymajor,Majorsize
Item | Description | Range |
---|---|---|
x tick spacing | numeric expression in current units; Default = 0, no ticks | (see text) |
y tick spacing | numeric expression in current units; Default = 0, no ticks | (see text) |
y axis location | numeric expression specifying the location of the y axis in x-axis units; Default = 0 | -- |
x axis location | numeric expression specifying the location of the x axis in y-axis units; Default = 0 | -- |
x major count | numeric expression, rounded to an integer, specifying the number of tick intervals between major tickmarks; Default = 11 (every tick is major) | 1 through 32 767 |
y major count | numeric expression, rounded to an integer, specifying the number of tick intervals between major tick marks; Default = 1 (every tick is major) | 1 through 32 767 |
major tick size | numeric expression in graphic display units; Default = 2 | -- |
Scaling | PIVOT | CSIZE | LDIR | PDIR | |
---|---|---|---|---|---|
Lines (generated by moves and draws) | X | X | [4] | ||
Polygons and rectangles | X | X | X | X | |
Characters (generated by LABEL) | X | X |
| ||
Axes (generated by AXES and GRID) | X |
| |||
Location of labels | [1] | [3] | [2] |
|