Home

Agilent 3396 Series Integrator

image

Contents

1. P PACK C 15 PACK S 34 PEAKNUM 49 PEN 36 PI 40 PK_WD 53 PLOT 36 POS 40 PRINT 13 21 PRINT S 34 PRINTER 34 PROC 49 49 PROMPT 13 PURGE 15 PURGE S 34 R RANDOMIZE 23 READ 24 35 REAL 41 RECORD 22 35 RELEASE 35 REM 24 RENAME C 15 RENAME S 35 RENUMBER 13 REPORT 45 REPORT_FILE 50 REPORT_MEMO 50 REST 35 RESTORE 24 RESUME 17 RETRY 31 RETURN 28 RF 50 RND 41 ROTATE 43 ROUND 41 50 RTRIMS 41 RUN 15 RUNFILE 50 RUNNUM F 50 RUNNUM S 25 S SAMPAMT 50 50 SAMPNUM 50 SAVE 16 SAVEMETH 45 SAVESEQ 45 SCRATCH 13 SEPCODES 50 SERIAL NUMBERS 41 SERIALIZE 13 SET 16 18 SET 5 24 35 52 SGN 41 SHIFT 43 SIGNAL LEVEL 52 SIN 41 SLICE AREA 51 SLICE NUM 52 SLICE TIME 52 SLICE WIDTH 52 SQR 41 START RUN 45 START SEQ 46 STEP 18 STEP S 26 STOP 25 STR 41 SYSTEM 16 T TAB 25 TAN 41 TERMREAD 16 Index THEN 27 THRSH 53 TIME C 13 TIME 42 TIME 5 29 TIMES 42 TITLES 51 TO 26 TRACE 18 25 U UCASES 42 UNCALRF 51 UND 42 UNTIL 25 USE 31 USING 21 34 USING 42 V VAL 42 W WAIT 28 WHEN 5 30 WHILE 5 26 28 WIDTH 51 X XADDRESS 13 XLIST 14 XMARGIN 14 XOR 3 Z ZERO 53 UE Agilent Technologies Agilent Technologies Inc 08 97 Part Number G1213 90120
2. x n x rounded to n places to the right of the decimal point or n places to the left if n 0 RTRIMS A A with trailing spaces deleted SERIAL NUMBERS Returns a 10 character serial number if an EPROM with a serial number is installed otherwise returns a null string SGN Algebraic sign of x Negative 1 0 0 positive 1 SIN x Sine of x radians SOR x Positive square root of x STRS x String equivalent to x as it would be printed from a simple PRINT statement STRS 10 10 TAN x Tangent of x radians 41 TIME Current time inseconds since the previous midnight Resolution is 0 05 seconds TIMES Current time in 24 hour clock format HH MM SS UCASE A A with each lowercase letter in uppercase UCASES upper returns UPPER UND numeric variable 1 if variable value is undefined otherwise 0 is returned USINGS A5 x Formatted representation of number x using A as the template See PRINT USING statement VAL AS Number represented by A VAL 10 returns 10 42 BINARY FUNCTIONS These operate on the internal 16 bit 2 s complement integer representation MSB is bit 15 LSB is bit 0 there is no carry bit Floating point numbers are first converted to the nearest integer For SHIFT and ROTATE operations is to the right BINAND x1 x2 Bit by bit logical and of xl and x2 BINCMP x Bit by bit complement of x BINEOR x1 x2 Bi
3. 10241 if not a file 0 is returned ASK Zchannel RECORD numeric variable Assign the current value of the record number pointer in file channel to the variable This is the byte position in the file rather than a true record number If not a file return 0 For LIF ASCII or LIF binary files note that the value returned includes bytes used for record size counts and padding and so will not be the same as the total number of characters in the records that have been read 40 ASK 6 RECORD R 32 ASSIGN ilespec keynumber Assign the program filespec to the key key number filespec is a string variable or quoted string key number ranges from 0 to 9 The program is loaded and run when the key is pressed while in system mode The program assigned to key 0 is loaded and run after each analytical run CHAIN filespec Terminate execution of currently running program and clear the workspace load and execute a program file Only BAS files may be chained CLOSE channel Close access to file channel If channel is zero or not in use no action is taken COPY filespec filespec2 Copies the first file creating the second file CREATE filespec filesize Create a file of filesize bytes on the specified or default disk An error occurs if the file will not fit If filesize is negative CREATE builds the largest possible file DIRECTORY diskspec filespec Print a directory of all files on a disk use diskspec only or the e
4. CREATE C 14 CREATE S 33 D DATE 11 DATE F 38 DATES 38 DATE2 38 DATUM 32 DEBUG 17 DEBUG S 19 DEF 5 19 DELAY 28 DELETE 11 DEVICE 38 DIM 5 19 DIRECTORY C 14 DIRECTORY S 33 DIV DO 5 25 28 DQ 12 E ELSE 5 26 27 END 5 8 20 25 27 30 31 EPS 38 ERASE 33 EXCEPTION 5 29 EXIT C 12 EXIT S 26 EXLINE 30 EXP 38 EXT C 16 EXT S 24 EXT 48 30 EXTYPE 30 Index F FLOAT 38 FOR 5 FORMAT 14 FP 39 G GET 15 GETCALIB 44 GETMETH 44 GETSEQ 44 GOSUB 27 28 GOTO 28 30 GROUP_NAME 48 GROUP_SUM 48 H HEIGHT 48 HELP 12 HPIL_10 33 I IDENTIFIER 48 IF 5 27 IMAGE 5 20 NC_SLICE_NUM 51 NC_SLICE_TIME 51 NET_10 33 CONFIGURATION 15 VIT ACCESS 51 NJTIME 48 NPUT 8 20 NT 39 NTEGER 20 INTRND 39 IP 39 15 34 ISTDAMT 48 ISTDNUM 48 pa p pem 2 2 J JOIN 15 K KEY 39 L LCASES 39 LEN 39 LENGTH 32 LET C 17 LET S 20 LIFTYPE 32 LINE 20 LIST 12 LOAD 15 LOG 39 LOOP 27 LTRIM 40 M MARGIN C 16 MARGIN S 25 35 MAX 40 MAXNUM 40 METHOD NAMES 48 MIN 40 MOD 40 MODIFY 12 MULT 48 N NAME 34 NAMES 49 NEXT 5 26 NEXT C 12 NOLIST 12 NOT 3 NUM 40 NUMCALB 49 NUMGRPS 49 NUMLEYV 49 NUMPEAKS 49 Index O ON 28 OPEN 34 OPTION 21 OR 3 ORD 40
5. and press C reverses the current sense of the SHIFT key for letters i e if an unshifted letter key printed uppercase before CTRL C was pressed it will print lowercase afterward The SHIFT key then selects uppercase For keys other than letter keys the SHIFT key always selects the superscripted symbol on the keycap regardless of whether CTRL C has been used the lower symbol is printed if the SHIFT key is not used LABELS A label is defined by its appearance as the first or only item in a line and it must be followed by colon or a sign A label name follows the same set of rules that are followed for simple numeric variable names Labels may be used as transfer destinations before they are defined A label can be used instead of a line number as the destination of a statement such as GOTO or GOSUB Statement 350 below causes control to be transferred to the label appearing in line 300 300 LABEL1 PRINT X 310 Statement 320 Statement 350 GOTO LABEL1 When forming a list of destinations line number and label parameters may be mixed For example 100 ON X GOTO 100 HERE 200 THERE MULTIPLE STATEMENTS ON A LINE Two or more statements may be used on the same program line provided they are separated by colons semicolons signs or commas There are some exceptions Note that the restriction on ELSE only applies when it is part of a multi line IF THEN ELSE construct A label may be used in front of all s
6. are tried as defaults If no file specified run the workspace program starting at line number If no line specified run starting at the first line 15 SAVE filespec Store the workspace program on the default or specified disk Valid extensions are BAA and BAS Default extension BAS SET EXT event number Set an external event on an HP 19405A S ECM module on the HPIL loop to ON or OFF event number must evaluate to an integer between 1 and 8 inclusive a negative value indicates OFF state SET MARGIN co umnnumber Define the right margin for printing initial default is 80 range is 1 to 256 values gt 255 give no margin infinite line length allowed SYSTEM Print a table showing HP 3396 SERIES II configuration such as available devices on HPIL TERMREAD After opening a channel with NAME 1 1 is the RS 232C port may be used to read from the port buffer into A until an end condition occurs DEBUGGING AND RUN CONTROL COMMANDS These commands are valid responses to the break mode prompt ENTER BREAK COMMAND The BREAK DEBUG STEP and TRACE commands can also be used outside of break mode The LIST and PRINT listing commands may also be used in break mode as can the SET run parameter command Variable values may be listed using the PRINT command to aid debugging ABORT Terminate program execution and return the BASIC prompt BREAK ine number OFF Set a breakpoint at line number Program
7. for operators at the same priority level Use parentheses to override the priority order Nested parentheses are evaluated from the inside out six levels of nested parentheses are permitted Where alternate syntactical forms are shown here or elsewhere in this manual it means that all forms are accepted as input but are converted to the preferred form given first In Decreasing Priority Order or Exponentiation NOT unary Logical negation arithmetic negation DIV MOD Multiplication real division Integer division no remainder modulo Addition subtraction amp or String concatenation Relationals lt gt lt gt lt gt and gt lt are acceptable alternate forms of not equal to AND Logical conjunction OR XOR Logical disjunction exclusive OR NUMERIC VARIABLES Names must start with a letter and may contain up to 31 character including letters numbers and the underscore character All characters are significant Lowercase letters are upshifted Names cannot be the same as certain keywords and functions Variables are handled as either 16 bit integers 32768 to 32767 or 32 bit floating point numbers 1 7 38 to 1 7E38 Conversions between the two forms are handled automatically TYPING TEXT At turn on the letter keys print in uppercase capital letters Holding down the SHIFT key while pressing a letter key prints in lowercase Pressing CTRL C hold CTRL down
8. heading and the column data If the format item begins with a justifier spaces are added on the right lt justifier or the left gt justifier to fill the format item width If there is no justifier the string is centered with any leftover space placed on the right RANDOMIZE Generate a new seed initial value used to generate a random sequence for the RND function 23 RESTORE ine number abel Reset data pointer to the first item in the DATA statement specified by line number or label If no line number or label is specified reset to the first item in the first DATA statement READ variable list Read values from the DATA list and assign them to the variables 130 READ X Y 2 REM any text or any text Program remarks and comments can be substituted for REM REM statements may not be used on the same line following certain key words that do not permit trailing statements however without a statement separator maybe used in these cases SET runparameter value Set a runparameter to the specified value runparameter choices are AR REJ ATT2 SP PK WD THRSH and ZERO See the Run Parameters section for limits 150 SET CHT SP 5 0 SET EXT event number Set an external event on an HP 19405A S ECM module on the HPIL loop to ON or OFF event number must evaluate to an integer between 1 and 8 inclusive a negative value indicates OFF state 100 SET EXT 1 SET FONT Where n is a
9. numeric expression If n equals 0 the font will be small If n is a non zero the font will be large 24 SET MARGIN co umnnumber Define the right margin for printing initial default is 80 range is 1 to 255 values gt 255 give no margin infinite line length allowed SET RUNNUM runnumber Set the run number STOP Terminate program execution and return to the BASIC prompt Same as END TAB co mnnumber Used in PRINT statements to move printhead to specified column 380 PRINT LEFT TAB 33 RIGHT TRACE OW OFF Not valid in Autocall Programs TRACE ON lists each statement number as it is executed TRACE OFF cancels the trace See DEBUG statement in this section LOOPING AND CONTROL FLOW STATEMENTS DO DO marks the beginning of a non indexed loop and a LOOP LOOP UNTIL or LOOP WHILE statement marks its end DO UNTIL test DO UNTIL marks the beginning of a non indexed loop with a test condition and a LOOP LOOP UNTIL or LOOP WHILE statement marks its end If test is true passes control to the line following the LOOP LOOP UNTIL or LOOP WHILE statement If test is false proceeds to the immediately following statement 25 DO WHILE fest DO WHILE marks the beginning of a non indexed loop with a test condition and a LOOP LOOP UNTIL or LOOP WHILE statement marks its end If test is false continues to the line following the LOOP LOOP UNTIL or LOOP WHILE statement If test is true proceeds to
10. peak number corresponding to the specified calibration number This is the inverse of the CALNUM function PROCS Calculation procedure in the current calibration table Possible returns are NORM ESTD ESTD ISTD and ISTD followed by either AREA or HEIGHT to show what measurement was used If current method is not calibrated returns AREA PROCFILE Name of the processed data file Maximum length 14 characters 49 REPORT FILES Name of the report file Maximum length 14 characters REPORT MEMO Maximum length 126 characters Can come from option 7 default report memo or from sample information table RF peak number Response factor of the specified peak RT peak number Measured retention time of the specified peak in minutes RUNFILE Name of the unbunched or bunched data file Maximum length 14 characters RUNNUM Current run number SAMPAMT Amount of the sample used with external and internal standard calculations Name of the sample Maximum length 12 characters SAMPNUM Number of bottle most recently injected or BCD number from the HP 3396 SERIES II back panel or from the signal data file after reintegration SEPCODES peak number Peak Separation Code for specified peak Maximum length 4 characters 50 TITLES Report title from Report Options dialog Maximum length 42 characters UNCALRF Response factor used for uncalibrated peaks WIDTH p
11. to the end of the parent string Note that the colon must be present line 10 Two numbers separated by a semicolon specify the beginning character and the number of characters in the substring respectively If A is a parent string of 5 characters then B C and D are identical 10 BS AS 3 11 5 AS 3 5 12 D AS 3 3 Assume a substring expression SUB X Y If X is greater than Y a null string is returned See line 103 The examples assume the parent string SUB Asterisks enclose the substrings 100 PRINT amp SUBS 1 1 amp A 101 PRINT amp SUB 2 5 amp BCDE 102 PRINT amp SUB5 2 amp BCDEFGH 103 PRINT amp SUBS 4 1 amp When a substring appears on the left side of a LET assignment the parent string characters presently in the positions specified by the substring are replaced by the assigned value If the first subscript is greater than the second subscript as in line 208 the value assigned is inserted starting at the beginning position designated by the first subscript Existing characters are pushed to the right to create space If the resulting parent string exceeds its dimensioned length an exception is generated When only one position is specified in the substring characters in the parent string are completely replaced beginning at the designated position Note in line 204 that there are more parent string characters to be replaced than there ar
12. use file specifier FORMAT diskspec volume numberfiles Prepare a disk to record information and assign It a volume name Maximum length for volume is 6 characters number files can be any integer it is rounded up to the next increment of 8 when formatting floppy or hard disks and to the next increment of approximately 11 for the memory disk M FORMAT A Vol 5 64 GET filespec Erase workspace and load specified program file Valid extensions are BAA and BAS if none is provided first BAS and then BAA are tried as defaults Only the part of a BAA file that fits in available memory is loaded If a BAS file does not fit an error occurs INET CONFIGURATION Prints a table showing the characterisics of the INET devices on the HPIL INET loop JOIN filespec Merge a BAA file with the workspace program If line number duplication occurs the line from filespec takes precedence non conflicting lines interleave LOAD filespec Erase the workspace load a BAA file and strip of all REM or comments and blank lines PACK diskspec Recover fragmented unused space on a disk PURGE fespec Delete a file from a disk RENAME filespec 1 filespec2 Change filespecl to filespec2 An error occurs if filespec2 already exists Both files must be on the same disk RIUN filespec line number Fetch and execute program filespec if specified Valid extensions are BAA and BAS if no extension is given first BAS and then BAA
13. Agilent 3396 Series Integrator BASIC Language Quick Reference Guide Agilent Technologies Agilent 3395 3396 Integrators e e E Manuals These manuals may contain references to HP or Hewlett Packard Please note that Hewlett Packard s former test and measurement semiconductor products and chemicals analysis businesses are now part of Agilent Technologies The HP 3395 3396 Integrator referred to throughout this document is now the Agilent 3395 3396 Integrator E Agilent Technologies Contents CONVENTIONS tin eas 1 LOG ON PROCEDURES 1 LEAVING BASIC 1 HELP MESSAGES 2 HALTING A RUNNING PROGRAM ss 2 ABORTING A COMMAND sn 2 OPERATORS maiin A ces 3 NUMERIC VARIABLES Re ne ne 3 TYPING ee Lu A me 4 LABELS 4 MULTIPLE STATEMENTS ON ALINE eene 5 STRINGS AND SUBSTRINGS 5 NUMERIC ARRAYS 7 STRING ARRAYS darts eat aie aaa 7 AUTOCALLPROGRAMS dei tesa 8 DEVICE ADDRESSES x22 tese 9 FILE SPECIFIERS AND TYPES sise 9 COMMAND RANGE it etui e epa ttd DH ues 11 EDIT AND LIST COMMANDS serrer 11 FILE AND DEVICE COMMANDS 2 0440 000 14 DEBUGGING AND RUN CONTROL COMMANDS 17 GENERAL PR
14. Integer part by truncating at the decimal point of x KEYS Returns one character for the last key hit on the HP 3396 SERIES II keyboard orthe terminal keyboard in External BASIC mode then clears to zero the NUL character See Table A LCASES A A with each uppercase letter shifted to lowercase LCASES LOWERCASE lowercase LEN A Number of characters logical length in A LOG x Natural base e logarithm of x 39 TRIM 4 A with leading spaces deleted y Larger more positive of x and y MAXNUM Largest floating point value that can be represented 1 70141E 38 MIN x y Smaller more negative of x and y MOD x y x modulo y x y INT x y NUM A ASCII decimal equivalent of first character in A See Table A NUM amp returns 42 NUM returns 42 ORD 4 Ordinal position of A AS must be only 1 character or else consist of one of the ORD mnemonics in Table A For example the ordinal position for backspace is 8 and the mnemonic is BS ORD BS returns 8 PI Represented as 3 14159 POS 47 42 Character position of the first character of the first occurrence A1 of the string value 2 If the value of A2 is not present A1 a zero is returned POS SUBSTRING SUBSTRING returns 4 40 REAL x Converts an integer number into the real floating point format RND Next number in a pseudo random sequence ROUND
15. N NOW END key number Not valid in Autocall Programs Same as START RUN_NOW except The program containing this statement must be assigned to a numeric key and run by pressing the numeric key in system mode When the statement is executed the program containing it is cleared from the workspace When the run ends the program assigned to key number is loaded and executed The key number program is cleared from the workspace when it ends START SEQ LATER Not valid in Autocall Programs Programmatic initiation of a sequence of analytical runs Sequence begins when START is pressed and statements following START SEQ LATER are suspended until the sequence ends START SEQ LATER END key number Not valid in Autocall Programs Same as START SEQ LATER except The program containing this statement must be assigned to a numeric key and run by pressing the numeric key in system mode When the statement is executed the program containing it is cleared from the workspace When the sequence ends the program assigned to key number isloaded and executed The key number program is cleared from the workspace when the sequence ends START SEQ NOW Not valid in Autocall Programs Programmatic initiation of a sequence of analytical runs Sequence starts immediately and program statements following START SEQ NOW are suspended until the sequence ends START SEQ NOW END Key number Not valid in Autocall Programs Same as START SEQ NOW except The program co
16. ND IF 70 NEXT EXTYPE Return the exception number The function EXTYPE returns 0 if used outside of an exception processing block 30 RETRY ine number label In a USE block clears the exception and transfers control with no parameter to the line which caused the exception with the ALL parameter to the WHEN EXCEPTION IN statement to retry the entire block with a line number or label parameter to the specified line which must be in the protected block USE Separates the block of statements being protected against exceptions from the correction statements If no exception has occurred when USE is reached control transfers to the line following the END WHEN statement WHEN EXCEPTION IN Starts a block of statements for which exception protection is desired When an exception occurs statements following USE are executed to perform corrective action 10 WHEN EXCEPTION IN Statement 50 USE Exception processing statements 90 END WHEN FILE AND DEVICE STATEMENTS channel may range from 0 to 99 Channel 0 is defined to be the device from which BASIC is being run channel 0 is always open File specifiers which appear as parameters in some of these statements may be supplied as either quoted strings or string variables A complete filespec is required the diskspec portion cannot be defaulted LIF ASCII files BAA RPT RPA UA1 UA2 and files without extensions and LIF binary files are rea
17. OGRAM STATEMENTS eerte 19 Formatting Numbers 22 Formatting SNIS oce tec baba rates 23 LOOPING AND CONTROL FLOW STATEMENTS 25 EXCEPTION PROTECTION STATEMENTS AND FUNCTIONS 29 FILE AND DEVICE STATEMENTS 3l PLOTTING STATEMENTS 21 re repe 36 MATH AND STRING FUNCTIONS 37 BINARY FUNCTIONS ct chu nn ee 43 CHROMATOGRAPHIC STATEMENTS AND FUNCTIONS 44 SIGNAL DATA ACCESS STATEMENTS AND FUNCTIONS 51 RUN PARAMETERS sente 52 ii Contents CONVENTIONS Optional terms Italics Supply a value More of the same Select one of the items is separator LOG ON PROCEDURES 1 BA at the system prompt BASIC Is now actlve on the HP 3396 SERIES II keyboard 2 Type BX at the system prompt BASIC is now active on an external display terminal See Section 15 of the User Manual for connection instructions The HP 3396 SERIES Il keyboard is inactive until External BASIC is exited except that CTRL BREAK maybe used to reset the instrument LEAVING BASIC To exit BASIC either local or external type EXIT or just E Ifthe message KEEP PROGRAM IN WORKSPACE Y N appears respond Y or just ENTER to return to system mode without erasing th
18. ON or OFF of the event specified event number must round to an integer from 1 to 8 GROUP NAMES group number Name of the specified group in the calibration table Maximum length 16 characters GROUP SUM group number Total of the calculated amounts of the peaks in the specified group HEIGHT peak number Baseline corrected height of the specified peak in 1 8 microvolts IDENTIFIERS Instrument identifier Set using the system mode IDENTIFIER command Maximum length 12 characters INJTIME Date and time when sample was injected Maximum length 22 characters ISTDAMT Amount of the internal standard ISTDNUM Calibration number of the internal standard peak METHOD NAME Most recently reported method file name file name of the active method used in the most recent run Maximum length 14 characters Returns null string if the active method is not stored in a file anywhere MULT 48 Value of the constant factor by which all calculation procedure results are multiplied MULTIPLIER parameter NAMES number Name of the calibrated peak Maximum length 16 characters NUMCALB Maximum calibration number used in the present calibration table NUMGRPS Total number of peak groupings in a sample NUMLEV calibration number Number of levels in the calibration for the calibrated peak NUMPEAKS Number of peaks in the processed data file PEAKNUM calibration number The
19. WE 41 A HP3396 Key ND e IPAIMOOWE 41 AUU 55 ASCII Decimal Graphic Display TT TNC 1 5 ORD Mnemonic UND GRA LCA LCB LCC LCD LCE LCF LCG LCH LCI LCJ LCK LCL LCM LCN LCO LCP 160 HP3396 lt 56 ASCII Decimal 114 115 116 117 118 119 120 121 122 123 124 125 126 127 225 226 227 228 229 230 231 232 233 234 235 236 237 238 240 241 242 243 244 245 246 247 248 249 Graphic Display PHAN ox mE lc ORD Mnemonic LCR LCS LCT LCU LCV LCW LCX LCY LCZ LBR VLN RBR TIL DEL HP3396 Key NS RS ES ume 005 cx LIST DEL ZERO ATT2 CHT SP AR REJ THRSH PK WD EXT INTG STOP START PLOT TIME PREP EDIT STORE LOAD SEQ METH CALIB REPORT AREA OP 57 58 A ABORT 17 ABS 37 ALL 31 AMT 47 AMT LBL 47 ANALYZE 44 AND 3 ANGLE 37 AR REJ 52 AREA 47 AREA PERCENT 44 ASK 32 ASSIGN 33 ATN 37 ATT2 52 AUTO NUMBER 11 B BA 1 BASE 5 21 BEEP 19 BINAND 43 BINCMP 43 BINEOR 43 BINIOR 43 BREAK C 17 BREAK K 2 BREAK S 19 BSTR 37 BTL BCD 44 BTL BIN 44 BVAL 37 1 C CALAMT 47 CALFIT 47 CALNUM 47 CALRF 47 CALRT 47 47 CAUSE 29 CHAIN 33 CHR 37 CHT_SP 53 CLOSE 33 CONTINUE 29 Copy C 14 COPY S 33 COS 38
20. ber all or part of the workspace program A dialog requests parameters This also allows blocks of lines to be moved SCRATCH Erase the entire workspace program Same as DQ F L SERIALIZE Reserved for future use See the BASIC Reference Manual CAUTION Use of this command without proper hardware may make the program in the BASIC workspace impossible to run TIME HH MM SS With no parameter lists the current time from the HP 3396 SERIES II internal clock With the parameter sets the clock to the specified time 24 hour format XADDRESS device address Specify the device for XLIST and XMARGIN Default device first printer on HPIL loop 13 XLIST range Lrangel Print all or part of the workspace program on the device specified by XADDRESS Default print entire program XMARGIN column number Set right margin on device specified by XADDRESS Default no margin infinite iine Iength allowed FILE AND DEVICE COMMANDS Copy filespec 1 filespec2 Copy contents of filespecl to filespec2 filespec2 is created by Copy an error occurs if it already exists CREATE filespec filesize Create a file of the size specified in bytes on the specified or defaulted disk An error occurs if file cannot fit on the disk if filesize is negative CREATE builds a file as large as possible DIRECTORY diskspec filespec Print the directory for all files on a disk use disk specifier only or for a specific file
21. ction is ignored and alternative if present is executed If test is a numeric expression rather than a relation test is true if the expression is non zero action and alternative may be executable statements or transfer destinations line numbers or labels A dangling THEN or ELSE sets up a multi line IF and a multi line IF must be ended by ENDIF A nested IF cannot be on the same line as the enclosing IF Both actions and alternatives may consist of multiple statements on the same line with separators if the action or alternative is the last item in the line The entire group of statements is either executed or not executed depending on the condition of test 100 IF A B THEN 200 150 IF A B THEN PRINT B ELSE 160 PRINT 170 LOOP Marks the end of a loop started by a DO DO UNTIL or DO WHILE statement When executed passes control to the DO DO UNTIL or DO WHILE statement which began the loop 27 LOOP UNTIL test Marks the end of a loop started by a DO DO UNTIL or DO WHILE statement When executed passes control to the DO DO UNTIL or DO WHILE statement which started the loop if test is false otherwise transfers to the statement immediately following the LOOP UNTIL statement LOOP WHILE test Marks the end of a loop started by a DO DO UNTIL or DO WHILE statement When executed passes control to the DO DO UNTIL or DO WHILE statement which started the loop if test is true otherwise transf
22. d a record at a time if the record is assigned to a numeric variable conversion to a number is done if possible otherwise an 31 exception is generated If the record read is assigned to a string variable but will not fit an exception is also generated The size of elements in DAT files is 4 bytes for all numbers strings use 4 bytes plus the number of characters in the string Checks are done to see that requests to READ numbers or strings from DAT files are reading an item of the correct type Other HP 3396 SERIES II unique files are read n bytes at a time by reading a string or substring of length n No checks are done regarding the format of what is read It is also possible to read a4 byte floating point internal format number directly from such a file by reading into a numeric variable ASK channel DATUM string variable Assign the type of the next data item to be read from file channel to string variable For DAT files returns STRING NUMERIC NONE end of file reached or UNKNOWN bad file format or incorrect record pointer position in file for all other files and devices returns UNKNOWN 40 ASK 5 DATUM AS ASK channel LENGTH numeric variable Assign the physical length in bytes of file channel to the variable If not a file return 0 ASK channel LIFTYPE numeric variable Assign the LIF file type number In file channel to the variable LIF ASCII 1 LIF binary 2 LIF HP 339 6SERIES II unique
23. d lf not present filespec must be a quoted string GETSEO filespec Erase the current sequence and load the specified sequence file ext type is automatically added if not present filespec must be a quoted string 44 REPORT Generate a report using the calculation procedure specified by the currently active method SAVEMETH filespec Store the current method on the device and file specified filespec must be a string variable or quoted string SAVESEO filespec Store the current sequence on the device and file specified filespec must be a string variable or quoted string START RUN_LATER Not valid in Autocall Programs Programmatic initiation of an analytical run Run begins when START is pressed and statements following START RUN_LATER are suspended until the run ends START RUN LATER END key number Not valid in Autocall Programs Same as START RUN_LATER except The program containing this statement must be assigned to anumeric key and run by pressing the numeric key in system mode When the statement is executed the program containing it is cleared from the workspace When the run ends the program assigned to key number is loaded and executed The key number program is cleared from the workspace when it ends START RUN NOW Not valid in Autocall Programs Programmatic initiation of an analytical run Run starts immediately and statements following START RUN_NOW are suspended until the run ends 45 START RU
24. e characters to fill the positions The extra characters in the parent string specifically G and H are deleted The following examples all operate on the parent string ABCDEFGH Statement Resulting SUB 201 SUBS 2 2 Q AQCDEFGH 202 SUB5 2 2 QR AQRDEFGH 203 SUBS 3 2 x ABXCDEFGH 204 SUBS 3 Acus ABACUS 205 SUBS 2 3 ADEFGH 206 50 5 2 3 123 A123DEFGH 207 SUBS 2 0 12 A12BCDEFGH NUMERIC ARRAYS Array storage is allocated by the DIM statement arrays of numbers which may be integer or floating point or the INTEGER statement arrays of integers An array name may be the same as a simple non array variable name in the same program and follows the same rules The first parameter in a dimensioning statement DIM or INTEGER defines the number of rows in the array Second and third parameters if present define the number of columns and number of layers the third dimension respectively 100 DIM B1 100 BA_OH 2 15 101 INTEGER 5 50 2 STRING ARRAYS String arrays can be one or two dimensional A string array name follows the same form as for a single string Line 200 defines a one dimensional array with 2 elements each element may contain up to 10 characters Line 210 fills the array from a not shown DATA statement In line 220 the subscript 1 specifies the element number to be printed 200 DIM A1 2 10 210 READ A1 1 A1 2 220 PRINT 15 1 L
25. e workspace program it will be ready for use the next time BASIC is entered or N to clear the workspace and return to system mode HELP MESSAGES The HELP reminder TYPE H FOR HELP appears immediately after logon Help may be requested whenever the BASIC prompt gt or the break mode prompt ENTER BREAK COMMAND is present by typing H or HELP The HP 3396 SERIES II displays a list of section headings The first four sections list names used in the program Note that names no longer used are removed only when RUN is executed The remaining sections contain listings of functionally related BASIC commands keywords functions and parameters The message ENTER SECTION NUMBER follows the list Respond with the number of the desired section Additional information for that section is displayed The same result is obtained by typing H section number HALTING A RUNNING PROGRAM In local HP 3396 SERIES II keyboard BASIC the BREAK key suspends program execution preserves all variables and enters break mode In external BASIC using an external display terminal the BREAK key is not active on the terminal use CTRL Y instead See the DEBUGGING AND RUN CONTROL section ABORTING A COMMAND The BREAK key halts command execution as soon as safely possible and returns the BASIC prompt gt If a command or BASIC line is typed in but the BREAK key is used before ENTER the input is ignored OPERATORS Execution is from left to right
26. eak number Width of the specified peak in minutes SIGNAL DATA ACCESS STATEMENTS AND FUNCTIONS Statements INIT ACCESS 7 channel Set the stored slice access pointer to 1 Use after opening the file but before accessing stored data INC SLICE NUM numeric expression Add numeric expression to the stored slice access pointer Cause an exception if the pointed to slice does not exist INC SLICE TIME numeric expression Add numeric expression 20 seconds to the current SLICE TIME If the new time does not fall within or on the end of an existing slice cause an exception If the new time is valid adjust the stored slice access pointer to point to the slice which contains the new time Functions SLICE AREA Area in microvolt seconds of the slice pointed to by the stored slice access pointer 51 SLICE TIME Time after start of run in 1 20 seconds at the end of the slice pointed to by the stored slice access pointer SLICE WIDTH Width in 1 20 seconds of the slice pointed to by the stored slice access pointer SLICE NUM Current value of the stored slice access pointer SIGNAL LEVEL Voltage level of real time input signal to HP 3396 SERIES II in millivolts See the BASIC Reference Manual for more information and specific limitations RUN PARAMETERS The Run Parameter functions return the current values of the run parameter settings The current values can be changed using the SET command which may a
27. ed type User defined type User defined type Files with no extension are in LIF ASCII format LIF binary files may be read but are not created by the HP 3396 SERIES II COMMAND RANGE The term range which appears as a parameter for several BASIC commands is defined as line number TO 6 number FIRST LAST F L Some examples are 55 20 50 FIRST TO 20 F L EDIT AND LIST COMMANDS Commands may be abbreviated by entering enough of the initial letters to distinguish between commands with the exceptions of FORMAT NOLIST and SERIALIZE A current line pointer is kept internally which provides a default line for many of these commands The HELP LIST and PRINT commands found in this section can also be used in break mode see DEBUGGING AND RUN CONTROL section AUTO NUMBER Supply line numbers automatically as program is entered into workspace A dialog requests the parameters DATE MMIDDI YY YY With no parameter lists the current date and time from the HP 3396 SERIES II internal clock With the parameter sets the clock to the specified date The first two digits of the year are optional until the year 2000 D ELETE range range Remove one or more lines from the workspace program Default delete the current line DO range range Delete Quietly one or more lines from the workspace program Lines removed are not listed Default delete the current line EXIT Terminate BASIC and
28. ers to the statement immediately following the LOOP WHILE statement ON index GOSUB ine number label Indexed transfer to a subroutine If index is not between 1 and the number of selections generate an exception 30 ON Y GOSUB 100 200 START ON index GOTO line number label Indexed transfer to a program line If index is not between 1 and the number of selections go to the next line 20 ON 1 GOTO 200 300 LOCATION RETURN Marks the end of a subroutine causes control transfer to the statement immediately following the GOSUB which called the subroutine WAIT DELAY numeric expression Program operation is suspended until numeric expression seconds have elapsed numeric expression cannot be greater than 86 399 seconds The DELAY keyword is automatically added if omitted 970 WAIT DELAY AMOUNT OF TIME 28 WAIT TIME numeric expression string expression Suspends program operation until the time specified numeric expression is expressed in seconds since the preceding midnight if greater than one day 86 400 seconds the value is reduced modulo 86 400 string expression is specified in 24 hour clock format HH MM SS Ifthe time specified has already occurred in the present day operation is suspended until that time the next day 200 WAIT TIME 11500 210 WAIT TIME 05 30 30 EXCEPTION PROTECTION STATEMENTS AND FUNCTIONS An exception is a deviation from the normal or expected program ro
29. hen END PLOT is executed While plotting data all carriage returns and line feeds are stripped from printed material and compressed width printing is used the printhead returns to the curve after each string PLOT X Y Ifnot already plotting begin plotting operation and turn PEN ON Advance paper by X units move the plotter printhead to Y X range is 0 to 16500 units 1 unit 1 660 000 cm Y range is 0 to 1312 full scale There are certain physical limits on the rapidity with which X and Y may change and yield accurate plots see the BASIC Reference Manual for more information and specific limitations PEN OFF Turn the plot dot OFF on the HP 3396 SERIES II plotter PEN ON Turn the plot dot ON on the HP 3396 SERIES II plotter END PLOT End plotting operation 36 MATH AND STRING FUNCTIONS Each function returns a value x and y represent numeric expressions n represents a numeric expression which is rounded to the nearest integer if necessary before use All returned strings are shown between double quotes to mark the start and end these quote characters are not part ofthe returned string ABS x Absolute value of x ANGLE x y Angle in radians between positive x axis and vector joining origin to point with coordinates x y ANGLE 5 5 returns 0 785398 ATN x Arc tangent in radians of x i e value of the angle whose tangent is x BSTR xn String representation of x using base n n must eval
30. ign values to the variables listed 120 READ 424 X Y 2 RELEASE REST channe Return unused space at the end of the file past the and of file marker to the disk For LIF ASCII files the file pointer must be at the and of file EOF marker or no action is taken Even if the file is empty a read must be done to return an EOF error before the system is aware of the EOF position and can execute this command no action is taken if these condition are not met RENAME filespec 7 filespec2 Change filespecl to filespec2 An error occurs if filespec2 already exists SET channel MARGIN column number Set right margin for channel See SET MARGIN for range If this statement is not used the default is no margin infinite line length allowed SET channel RECORD numeric expression Set record pointer in file channel to record number numeric expression Record numberis a byte position in the file rather than a true record number Use RECORD 0 to set to the first byte For LIF ASCII or LIF binary files any non zero value will set the file pointer to the physical end of the file it is not possible to set the file pointer to a particular record except by reading all previous records 70 SET 9 RECORD 80 35 PLOTTING STATEMENTS The chromatogram plotting operation which is invoked by the PLOT key may also be used from BASIC to plot any desired data This operation starts when a PLOT X Y statement is executed and terminates w
31. ine 300 defines a two dimensional array with 3 rows and 2 columns Each of the 6 elements may contain 5 characters Lines 310 through 350 fill the array from a not shown DATA statement The subscripts that identify the array element must be enclosed in parentheses 300 310 320 330 340 350 DIM A2 3 2 5 FOR I 1 TO 3 FOR 4 1 TO 2 READ A2 I J NEXT J NEXT I Substrings of elements are specified by one or two additional subscripts in a second set of parentheses 400 80815 15 2 3 401 SUB1 A1 2 6 6 402 SUB2 A2 2 1 2 5 AUTOCALL PROGRAMS A program assigned to key 0 zero is an Autocall program and will run automatically at the end of each analytical run Autocall programs cannot accept keyboard input and certain statements are not allowed They are INPUT START RUN_NOW END LINE INPUT START SEQ_LATER END START RUN _LATER END START SEQ_NOW END DEVICE ADDRESSES Devices attached to the HP 3396 SERIES II are identified by addresses These are numbers in the range 2 to 30 some of which are reserved or pre defined Address Device e 2 Raster Mode 1 RS 232C 0 HP 3396 internal printer alphanumeric 1 7 Reserved for HPIB devices 8 30 HPIL loop devices FILE SPECIFIERS AND TYPES Acomplete file specifier abbreviated filespec is D NAME EXT D is the disk specifier abbreviated diskspec and consists of a disk drive name followed by a colon The default disk specifier u
32. ing digit places are replaced by spaces the character zeros the character or asterisks the character Floating characters float to the right over spaces but not over zeros or asterisks An integer format item consists of 1 or more of the same type of digit place character Ifa decimal point is added creating a floating point format item then all digit places to the right of the decimal point must be the character Exponential notation is produced by appending four circumflex accents to an integer or floating point format item The four accents represent the E or sign and two digit exponent Exponential format prints one digit to the left of the decimal point if any so at least one digit place should be present in this position Numbers are rounded as necessary to fit the specified format If a number will not fit the specified format an attemptis made to print the information by moving the decimal point changing to exponential notation if not specified and or dropping leading or characters If this fails the format item field is filled with asterisks Justifiers may be used to mark the start of anew numeric format item since only 1 justifier is allowed per format item The justifier is replaced by the character to its right Numbers are always right justified Formatting Strings Astring may be output using any format item valid for numbers This allows the format item to be used for both a column
33. ll produce the same printed result 100 PRINT USING 4 02222 X Y 200 DIM 5 11 201 LET AS 3448 7229 202 PRINT USING AS X Y 300 IMAGE 301 PRINT USING 300 X Y 21 Each character in the format string represents one character position in the output line Characters are either formatting characters see the table which control the appearance of items from the list of items being formatted or literal characters any not in the table which are output unchanged Format items are sequences of formatting characters which must be in the order shown they may be omitted or in some cases repeated Justifiers gt lt Floating characters Digit places Number signs Circumflex accent A format item ends when a left to right scan of the format string encounters an out of order formatting character any non formatting character or the end of the format string If the output line exceeds the margin setting for the device the line is broken into two lines Formatting Numbers Leading characters are generated according to this table Floating characters Character generated First Last non negative negative 2 none b none t none none none La ven 22 A format item may contain only one of each type sign or of floating character Digit places are represented by the and characters Unused lead
34. lso be used as a program statement in this section Command or Statement SET runparameter value Set a runparameter to the specified value runparameter choices are AR REY ATT2 CHT_SP PK_WD THRSH and ZERO Functions or Parameters AR_REJ Area rejection level Range is from 0 to 2 147 483 647 area counts ATT2 Chart attenuation in powers of 2 from 8 to 36 52 CHT SP Chart speed from 0 to 30 0 cm min for source or filtered plots and from 0 to 3 0 mm peak for Unigram plot PK WD Peak width setting from 0 01 to 2 5 minutes THRSH Threshold in powers of 2 from 6 to 28 ZERO Chart zero offset from 6 for the left margin to 100 for the right margin 53 Table A HP 3396 Key and Character Set ASCII Graphic ORD HP3396 Decimal Display Mnemonic Key 0 NUL CTRL 1 SOH CTRL A 2 STX CTRL 3 C 4 CTRL 0 5 6 7 BEL CTRL G 8 pad BS BKSP 9 HT CTRL 10 LF CTRL J 11 VT CTRL 12 FF CTRL L 13 CR ENTER 14 50 CTRL N 15 5 0 16 DLE CTRL P 17 DC1 CTRL 0 18 DC2 CTRL R 19 DC3 CTRL 20 064 CTRL 21 CTRL U 22 SYN CTRL V 23 ETB CTRL W 24 CAN CTRL X 25 BREAK EM BREAK 26 SUB CTRL Z 27 lt ESC ESC 28 FS 29 GS 30 RS CTRL 31 US CTRL _ 32 space SP 33 34 i i 35 ASCII Decimal Graphic ORD Display Mnemonic e IPNIMOO
35. ntaining this statement must be assigned to a numeric key and run by pressing the numeric key in system mode When the statement is executed the program containing it is cleared from the workspace When the sequence ends the program assigned to key number isloaded and executed The key number program is cleared from the workspace when the sequence ends 46 Functions AMT peak number Concentration or amount determined by the calculation procedure LBL Amount label from Option 4 Report Options dialog Maximum length 10 characters AREA peak number Baseline corrected area in 1 8 microvolt seconds of the specified peak CALAMT calibration number level number Amount of the calibration entry CALFIT Type of calibration fit Returns P point to point L linear regression or N non linear i e quadratic CALNUM peak number Calibration table number of the specified processed peak Peaks are numbered in order of retention time This is the inverse of the PEAKNUM function CALRF calibration number level number Response factor at specified calibration point CALRT calibration number Calibration table retention time of the calibrated peak CALTYPE peak number Type of calibration peak Returns R Reference Peak S Internal Standard Peak amp Reference and internal Standard Peak or Blank character Other 47 EXTS event number Indicates state
36. ntry for aspecific file use complete filespec ERASE REST channel Set the end of file marker to the current position of the file pointer effectively erasing the remainder of the file HPIL 10 RESERVED INET I0 address command string variable 20 INET 8 BOTTLE 100 AS 33 OPEN channe NAME filespec device address Assign a channel number to a file or an external device If a file open it 20 OPEN 20 D 21 OPEN 30 NAME E AFILE BAS 22 OPEN B40 NAME 8 PACK diskspec Recover fragmented unused space on a disk diskspec must be a string PRINTER IS channel Define current output device for PRINT statements PRINT channel expression list Write data to channel specified 530 PRINT 12 BS CS D PRINT channel USING string line number label expression list Evaluate the expression s and send formatted output to the channel If expression list contains more than one item and channel is a file all formatted outputs are combined into a single record Format is controlled by a format string which may be supplied as a quoted string as a string variable to which the format string has been assigned or as a line number or label which contains an IMAGE statement See the PRINT USING statement for the format string details 120 PRINT 5 USING 88 PURGE filespec Delete a file from a disk 34 READ channel variable list Read data from the specified channel Ass
37. pted multiple assignment LET A B 5 is treated as LET A B 5 which sets A 1 if B 5 and A 0 if B 5 300 LET AS STRING 300 X 100 Y LINE INPUT string variable Not valid in Auto call Programs Accept an entire line of input including leading and trailing spaces from the keyboard and assign it to string variable No prompt is issued 10 LINE INPUT AS 20 OPTION BASE 0 1 Set lower limit for array indices Default state 1 PRINT expression expression Evaluate the expression s and send output to the current printer The separator spaces values apart 14 character wide fields while separator places values as close as possible The separator used at the end of a line suppresses carriage return and line feed Floating point numbers are printed with a decimal point or in exponential format they are rounded to 6 digits and trailing zeros in the fractional part of the representation are dropped Numbers which are in integer form are printed without a decimal point 120 PRINT 5 A STRING ANOTHER PRINT USING string line number label expression list Evaluate the expression s and send formatted output to the current printer Format is controlled by a format string which may be supplied as a quoted string as a string variable to which the format string has been assigned or as a line number or label which contains an IMAGE statement In the following examples lines 100 202 and 301 a
38. return to system mode HELP See the introductory material in this manual LIIST range range Print all or part of the workspace program on the internal printer Default print entire program MODIFY number List specified line for editing use R D or I to replace delete or insert text Default edit the current line insert characters entered Position left edge of print head below first character to be modified or to have text inserted in front of Terminate modify with ENTER Increment the current line pointer and list the new current line NOLIST Prevent workspace program from being listed or revised to provide security Use before SAVE permits program to be saved and run in BAS format but not listed or revised Scans program to check for certain errors so that checking need not be repeated for subsequent runs Before using NOLIST it is usually desirable to load a copy of the program into workspace using the LOAD command to strip off remarks P RINT expression list Evaluate and print the expression s If no expression is given list the current line expressions can consist of or contain BASIC program variables if the variables have allocated data space Data space is allocated during and after a run until a change is made in the program or an EXIT from BASIC is executed PRINT X Y 0 01 AS PROMPT ON OFF Turns printing of BASIC prompt on or off RENUMBER Renum
39. sed for commands only is M or may be set by typing in the disk drive name followed by a colon Legal disk drive names are the capital letters A through Z with these exceptions H names the Host M names the HP 3396 SERIES II Internal Memory and I and Q may not be used A disk specifier must have a connected device associated with it NAME the name of the file may contain up to 8 characters if an extension is used or 10 characters without an extension Extensions must consist of exactly 3 characters Some commands and keywords add default extensions if none is explicitly provided Valid extensions file types and file descriptions are shown on the following page HP 3396 SERIES II files are in an LIF format which is unique to this instrument BAA BAS DAT MET SEQ CAL PRO PRA LIF ASCII HP 3396 HP 3396 HP 3396 HP 3396 HP 3396 HP 3396 HP 3396 HP 3396 LIF ASCII LIF ASCII HP 3396 HP 3396 LIF ASCII LIF ASCII LIF ASCII HP 3396 HP 3396 HP 3396 BASIC program file BASIC program file in memory image format BASIC data file Method file Sequence file Calibration file Unbunched signal data file Processed peak file from an analytical run Processed peak file from an ANALYZE command Report file from an analytical run Report file from an ANALYZE command Bunched data from an analytical run Bunched data from an ANALYZE command User defined type User defined type User defined type User defin
40. suspends just before executing the specified line and break mode is entered Only two breakpoints are permitted if a third one is specified the older of the two existing breakpoints is cancelled BREAK OFF cancels all existing breakpoints DEBUG OW OFF DEBUG ON or just DEBUG alone activates BREAK and TRACE statements within the program to help isolate programming errors DEBUG OFF disables them LET variable name value Assign a value to a variable Attempted multiple assignment LET A B 5 is treated as LET A B 5 which sets A 1 if B 5 and A 0 if 5 RESUME Exit break mode and continue program execution 17 SET variable name value Assign a value to a variable STEP OFF STEP ON or STEP alone sets break points at the beginning of every program line STEP OFF deactivates them TRACE frange OFF For the range specified list each line number as it is executed Only two ranges are permitted if a third range is specified the older of the two existing ranges is cancelled TRACE OFF cancels all existing ranges GENERAL PROGRAM STATEMENTS BEEP Emit a beep BREAK Not valid in Autocall Programs Place a breakpoint in the program Program suspends at BREAK statement and break mode is entered See DEBUG statement in this section 190 BREAK 195 IF 1 100 THEN BREAK DATA value value Define data list for the READ statements 200 DATA VALUES 1 2 3 DEBUG ON OFF No
41. t by bit exclusive or of xl and x2 BINIOR x1 x2 Bit by bit inclusive or of xl and x2 ROTATE x n Shift 16 bit binary representation of x n bit positions shift is performed with wraparound ROTATE 9 2 returns 36 SHIFT x n Shift 16 bit binary representation of x n bit positions shift is performed without wraparound SHIFT 9 2 returns 2 43 CHROMATOGRAPHIC STATEMENTS AND FUNCTIONS Statements ANALYZE filespec Reintegrates raw or bunched run data in filespec which must be a complete file specifier If is used uses the peak width profile from the original data storage for reintegration Parameters must be in a single string variable or quoted string Not valid in Autocall Programs AREA PERCENT Generate Area or Height report depending on mode selected in Option 4 of Report Options using data and parameters from the current method BTL BCD Returns the bottle number 0 99 as read in the Binary Coded Decimal format from the SAMPLE connector on the rear of the integrator BTL BIN Returns the bottle number 0 255 as read in the binary format from the SAMPLE connector on the rear of the integrator GETCALIB f espec Erase the current calibration and load the specified calibration file ext type is automatically added if not present f lespec must be a quoted string GETMETH fespec Erase the current method and load the specified method file ext type is automatically adde
42. t valid in Autocall Programs DEBUG ON activates BREAK and TRACE statements DEBUG OFF disables them Initial state is OFF DEF function name 1 to 3 parameters function definition Define a single line function maximum of 3 parameters The parameters are local to the DEF line and do not conflict with program varlables of the same name 260 DEF CUB X X 360 DEF CUBES X Y Z X Y Z DIM array or string name size Reserve storage for numeric arrays string arrays and string variables Initializes numeric values to a detectable undefined state and strings to null strings 120 DIM A 10 15 20 5 5 10 20 19 END Terminate program execution and return to the BASIC prompt Same as STOP An implied END is present at the end of any BASIC program IMAGE format string Template printout pattern for PRINT USING and PRINT USING statements In an IMAGE statement the template is an unquoted format string 100 IMAGE Date of 19 INPUT variable name list Not valid in Autocall Programs Print a prompt accept input from the keyboard and assign it to variables listed Multiple input responses on the same line should be separated by commas 170 INPUT AS B 3 1 CS X INTEGER variable size Declare integer variables or reserve space for integer arrays initalize values to 0 310 INTEGER A B 6 6 LET variable name expression Assign a value to a variable Attem
43. tatements Alone First on line Last on Line DATA DO ELSE DIM DO WHILE USE DEF DO UNTIL END IF INTEGER FOR LOOP IMAGE Labels NEXT OPTION BASE WHEN EXCEPTION IN REM STRINGS AND SUBSTRINGS Strings are sets of characters enclosed by single or double quote pairs String length number of characters is limited only by the amount of memory available String variable names consist of up to 31 characters as for numeric variables followed by a dollar sign Unlike numeric variables and arrays a simple non array string variable and a string array may not have the same name All strings must be dimensioned in DIM statements which specify the maximum number of characters or physical length of the string The actual number of characters is the logical length logical length of A below is 6 If an assignment exceeds the physical length the string is not changed and an exception is generated 1 DIM AS 9 ASTRINGS 5 2 LET AS string 3 ASTRINGS az by Strings can be compared by relational operators on an ASCII numerical basis and concatenated by the amp or operator Character positions in strings are numbered from leftmost 1 Substrings parts of a string are specified by one or two numbers or expressions in parentheses The first number specifies a beginning character Two numbers separated by a colon specify beginning and ending characters respectively If there is no second number the substring extends
44. the immediately following statement ELSE Separates the action and alternative parts of an IF THEN ELSE statement EXIT DO When executed transfers control to the line following the LOOP LOOP UNTIL or LOOP WHILE statement for the present DO DO UNTIL or DO WHILE loop EXIT FOR When executed transfers control to the line following the NEXT statement for the present FOR loop FOR index first TO ast STEP size FOR controls the repeated execution of a group of statements bounded by FOR and NEXT statement which have the same index a simple numeric variable Execution is repeated until any EXIT FOR condition is satisfied or the value of index exceeds last Then control is transferred to the statement immediately following the NEXT statement of the FOR loop If index is omitted in the NEXT statement NEXT is paired with the most recent FOR that is still unpaired Default STEP size is 1 last and size are evaluated dynamically with every iteration They along with index may be changed within the loop 10 FOR I 1 TO N Statements 30 IF test THEN EXIT FOR Statements 50 NEXT I 26 GOSUB ine number label Transfer unconditionally to subroutine at line number or label GOTO dine number label Unconditional transfer to specified destination IF test THEN action ELSE alternative END IF IF starts a conditional transfer or execution test is evaluated and if true the action is executed If test is false a
45. uate to an even integer from 2 to 72 BSTRS 3 2 returns 11 n Value of A interpreted using base n n must evaluate to an even integer from 2 to 72 BVAL 1F 16 returns 31 CHR x ASCII character equivalent of x See Table A CHRS 90 returns Z 37 COS x Cosine of x radians DATE Current Julian date from HP 3396 SERIES internal clock In YYDDD format DATE returns 85001 for January 1 1985 DATES Current date in YYYYMMDD format DATES returns 19610911 for September II 1961 DATE2 Current date in MMM DD YYYY format DATE2 returns SEP 11 1961 DEVICE x Parameter x is an HPIL address from 8 to 30 a string is returned showing the characteristics ofthe device Formatisthe same asin SYSTEM command listings If no device is at that address returns the null string EPS x Resolution error for x EXP x e raised to the x power FLOAT four character string Convert a four character string representing a floating point number in internal format as may be read from a processed peak file into a BASIC number Reverse of FLOAT X 38 FLOAT x Convert a floating point number into a number in four character string representing in a floating point number internal format Reverse of FLOAT four character string FP x Fractional part of x INT x Largest integer less than or equal to x INTRND x Nearest integer to x IP x
46. utine that requires special corrective action Exception protection programming is used to separate the exception from the regular program routine and carry out appropriate actions to process it Once the exception has been processed normal program routine resumes when the exception block is properly exited CAUSE EXCEPTION exception number Causes the exception indicated by exception number Used to test exception protection routines CONTINUE In a USE block clear the exception and transfer to the line following the one which caused the exception END EXCEPTION Used in a USE block to clear the exception state must be followed by a GOTO to code outside the USE block 29 END WHEN Marks the end of the exception protection block which began at WHEN EXCEPTION IN A GOTO on the same line may be used to transfer control to a line other than the one following END WHEN EXLINE Jime number label With no parameter return the line number where the last exception occurred or 0 if none has occurred With a line number or label para meter return 1 if the exception occurred in the specified line or 0 if it did not exception number Return exception message corresponding to exception number If no message anull string is returned To print a list of all exception messages run the following program 10 FOR I 1000 TO 13000 20 IF EXTEXTS 1 THEN 30 PRINT I 40 PRINT EXTEXTS 1 50 PRINT 60 E

Download Pdf Manuals

image

Related Search

Related Contents

Les bases de la photo  Untitled - Telefunken Hotel-TV  本文 - 国土地理院  HP D1600 User's Manual  Handsfree Rearview Mirror Mains libres Rétroviseur  TS-950S TS-950SD - ご利用の条件|取扱説明書|ケンウッド  Installation Instructions  

Copyright © All rights reserved.
Failed to retrieve file