=======================================
=                                     =
=      HP 2000 PART 2 (STATEMENTS)    =
=                                     =
=             CAPTURED BY             =
=                                     =
=      BLITZIOD ?? & GALACTUS **      =
=                                     =
=                 of                  =
=                                     =
=       THE ELITE HACKERS GUILD       =
=                                     =
=======================================


                         STATEMENTS
                         **********



 1. ADVANCE         2. ASSIGN          3. CHAIN           4. COM            
 5. CONVERT         6. CREATE          7. DATA            8. DEF            
 9. DIM            10. END            11. ENTER          12. FILES          
13. FOR & NEXT     14. GOSUB & RETURN 15. GOTO           16. IF...THEN      
17. IF END         18. IF ERROR       19. IMAGE          20. INPUT          
21. LET            22. LINPUT         23. LINPUT#        24. LOCK           
25. NEXT           26. PURGE          27. READ           28. READ#          
29. REM            30. RESTORE        31. STOP           32. SYSTEM         
33. UNLOCK         34. UPDATE         

ENTER YOUR CHOICE (ENTER 0 TO STOP)?1




                         ADVANCE


GEN FORM:     ADVANCE #FILE NUMBER;SKIP COUNT,RETURN VARIABLE


     THE ADVANCE STATEMENT CAUSES THE SPECIFIED FILE (SIGNIFIED BY THE
FILE NUMBER) POINTER TO BE MOVED PAST THE NUMBER OF ITEMS
SPECIFIED IN THE SKIP COUNT.  THE SKIP COUNT IS LIMITED TO 32767 AND
MUST BE A POSITIVE INTEGER.  IF THE 'ADVANCE STATEMENT IS EXECUTED SUCCESSFULLY
THE RETURN VARIABLE IS SET TO '0'.  IF AN END-OF-FILE MARKER IS ENCOUNTERED
BEFORE THE SPECIFIED NUMBER OF ITEMS HAVE BEEN SKIPPED THE RETURN VARIABLE
WILL BE SET TO THE NUMBER OF ITEMS YET TO BE SKIPPED.  THE ADVANCE
STATEMENT CANNOT BE USED WITH ASCII FILES.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?2




                         ASSIGN


GEN FORM:     ASSIGN FILE DESIGNATOR,FILE NO.,RETURN VAR.,[MASK],[RESTRICTION]


              OR

              ASSIGN *,FILE NUMBER,[RETURN VARIABLE]

     THE ASSIGN STATEMENT IS USED TO ASSIGN A FILE TO A FILE NUMBER
RESERVED IN THE FILES STATEMENT (eg. 100 FILES *,*,*) AND TO OPEN THE
FILE.  THE FILE DESIGNATOR CAN BE A STRING OR CAN BE ENCLOSED IN QUOTES
BUT IT MUST BE A VALID FILE NAME.  IF AN ASTERISK (*) IS USED IN PLACE
OF THE FILE DESIGNATOR THE FILE PREVIOSLY ASSIGNED TO THAT FILE
NUMBER IS CLOSED.  THE OPTIONAL MASK IS A STRING USED TO SCRAMBLE BASIC
FORMATTED FILES AS TO MAKE THEM 'GREEK' TO USERS NOT ACCESSING THE FILE
WITH THE SPECIFIED MASK.  THE SAME MASK MUST BE USED
WHEN READING FROM THE FILE AS WAS USED WHEN IT WAS PRINTED ON THE FILE.
THE OPTIONAL RESTRICTION IS A TWO-LETTER CODE USED TO SPECIFY ACCESSABILITY
RESTRICTIONS ON THE FILE.  RESTRICTION CODES ARE AS FOLLOWS:


RR                  NO SUBSEQUENT USER CAN ACCESS THE FILE WHILE
                    THE FILE IS OPEN

WR                  SUBSEQUENT USERS CAN READ FROM BUT CANNOT WRITE
                    TO WHILE THE FILE IS OPEN

NR                  SUBSEQUENT USERS CAN READ & WRITE WHILE THE FILE IS
                    OPEN  (NOTE:  THE FILE MUST HAVE MUTIPLE WRITE
                    ACCESS FOR THIS RESTRICTION).


RETURN VARIABLES:

 0             FILE AVAILABLE FOR READ AND WRITE
 1             AVAILABLE FOR READ ONLY
 2             READ ONLY
 3             FILE DOES NOT EXIST OR IS NOT ACCESSABLE
 4             FILE NUMBER OUT OF RANGE
 5             NO BUFFER SPACE AVAILABLE FOR FILE
 6             FILE IS UNAVAILABLE FOR READ OR WRITE
 7             SPECIFED RESTRICTIONS IMPOSSIBLE
 8             FILE IS AVAILABLE FOR WRITE ONLY





ENTER YOUR CHOICE (ENTER 0 TO STOP)?3




                         CHAIN

GEN FORM:     CHAIN [RETURN VAR.,]PROGRAM DESIGNATOR,[NUMERIC EXPRESSION]

THE CHAIN STATEMENT CAUSES THE CURRENT RUNNING PROGRAM TO TERMINATE
AND BEGIN EXECUTION OF THE PROGRAM SPECIFIED BY THE PROGRAM DESIGNATOR.
THE PROGRAM DESIGNATOR MAY BE ENCLOSED IN QUOTES OR MAY BE A STRING.
THE NUMERIC EXPRESSION CAN BE USED TO DEFINE A LINE NUMBER IN
THE PROGRAM TO BE CHAINED TO. IF SUCH AN EXPRESSION IS DEFINED PROGRAM
EXECUTION WILL BEGIN AT THE SPECIFIED LINE NUMBER.

RETURN VARIABLES:

0              SUCCESSFUL

1              BAD STATEMENT NUMBER SPECIFIED

2              NO ACCESS PERMITTED TO NAMED PROGRAM
3              CHAIN NOT PERMITTED


ENTER YOUR CHOICE (ENTER 0 TO STOP)?4




                         COM

GEN. FORM:     COM COMMON LIST


     THE COMMON STATEMENT IS USED TO LIST THE VARIABLES THAT 
ARE COMMON BETWEEN TWO CHAINED PROGRAMS.  ALL COMMON STRINGS
AND STATEMENTS MUST ALSO BE DIMINSIONED HERE.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?5




                         CONVERT

GEN. FORM:     CONVERT NUMERIC EXPRESSION TO DESTINATION STRING
               OR

               CONVERT  SOURCE STRING TO NUMERIC VARIABLE [,STMT #]


     THE CONVERT STATEMENT IS USED TO CONVERT A STRING TO A VARIABLE
OR A VARIABLE TO A STRING.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?6




                         CREATE

GEN. FORM:     CREATE RETURN VAR., FILE DESIGNATOR, FILE LENGTH [,RECORD SIZE]


     THE CREATE STATEMENT CREATES A BASIC FORMATTED FILE OF
THE DESIGNATED LENGTH.  THE RETURN VARIABLES ARE AS FOLLOWS:



RETURN VALUE                       MEANING

     0               THE FILE WAS CREATED SUCCESSFULLY
     1               A FILE ALREADY EXISTS WITH THE SAME NAME
     2               INVALID FILE NAME, ACCESS, FILE LENGTH OR
                     RECORD SIZE
     3               NO SPACE IN THE ACCOUNT
     4               NO SPACE IN THE SYSTEM


ENTER YOUR CHOICE (ENTER 0 TO STOP)?7




                         DATA

GEN. FORM:     DATA CONSTANT LIST


     THE DATA STATEMENT IS WHERE THE DATA IS STORED FOR THE 
READ STATEMENT.  IT IS ENTERED IN SEQUENCE WITH EACH ITEM 
SEPARATED BY COMMAS.  ANY STRING DATA MUST BE ENCLOSED IN
QUOTES.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?8




                         DEF

GEN. FORM:     DEF FUNCTION NAME(PARAMETER)=NUMERIC EXPRESSION


     THE 'DEF' STATEMENT IS USED TO DEFINE A FUNCTION 
SUCH AS:  A**2/(SQR(X)).  HERE IS AN EXAMPLE OF A USER DEFINED FUNCTION:

10 DEF FNA(X) = A**2/(SQR(X))

ALL FUNCTION NAMES MUST BEGIN WITH 'FN' AND HAVE A THIRD CHARACTER
BETWEEN 'A' AND 'Z'.  THE 'X' IN PARENTHASIS IS A DUMMY VARIABLE.
ITS PURPOSE IS TO SHOW WHAT ARGUMENT WILL BE USED WHEN THE FUNCTION
IS SUMMONED.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?9




                         DIM

GEN. FORM:     DIM DIMENSION LIST


     THE DIM STATEMENT IS USED TO SET THE AMOUNT OF SPACE ALLOTED
IN THE PROGRAM FOR A STRING OR AN ARRAY.


EXAMPLE:     20 DIM A(5),B(50),C$(100),D(7,10)



ENTER YOUR CHOICE (ENTER 0 TO STOP)?10




                         END

GEN. FORM:     END

      THE END STATEMENT TERMINATES THE RUNNING OR EXECUTING OF A
PROGRAM.  IT MAY OCCUR ANY WHERE IN THE PROGRAM BUT THE END STATEMENT
MUST ALWAYS OCCUR AT THE END OF A PROGRAM.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?11




                         ENTER

GEN. FORM:     ENTER #NUMERIC VARIABLE
               OR
               ENTER [# VARIABLE,] TIME ALLOWED, RETURN VAR., READ VAR,.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?12




                         FILES

GEN. FORM:     FILES  FILES LIST


     THE FILES STATEMENT IS USED AT THE BEGINNING OF A PROGRAM
TO OPEN THE FILES FOR USE IN THE PROGRAM.  AN '*' MAY BE USED
TO HOLD THE PLACE OF A FILE TO BE DESIGNATED LATER.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?13




                         FOR & NEXT

GEN. FORM:     FOR  FOR VAR.=INITIAL VALUE  TO  FINAL VALUE [STEP SIZE]
               NEXT  FOR VARIABLE

     THE FOR NEXT LOOP ALLOWES YOU TO GO THROUGH A SET STATEMENT 
A SPECIFIED NO. OF TIMES.  FOR EXAMPLE IF YOUR LOOP WAS:



                    100 FOR P=1 TO 5
                         .
                         .
                    150 NEXT P


ENTER YOUR CHOICE (ENTER 0 TO STOP)?14




                         GOSUB & RETURN

GEN. FORM:     GOSUB  STATEMENT NO.
               OR
               GOSUB  NUMERIC EXP.  OF  STATEMENT NO. LIST
               RETURN


     THE GOSUB STATEMENT IS A WAY OF DROPPING TO ANOTHER PART
OF THE PROGRAM BUT STILL KEEPING YOUR PLACE WHERE YOU ARE SO
YOU CAN RETURN AND CONTINUE ON WITH THE PROGRAM.  IF GOSUBS ARE
NESTED MORE THAN 20 DEEP THEN THE PROGRAM WILL TERMINATE WITH
AN ERROR STATEMENT.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?15




                         GOTO 

GEN. FORM:     GOTO  STATEMENT NO.
               OR
               GOTO  NUMERIC EXPRESSION  OF  STATEMENT # LIST


     THE GOTO STATEMENT OVERRIDES THE NORMAL ORDER THAT STATEMENTS
ARE CARRIED OUT.  IT TELLS THE PROGRAM TO SKIP TO THE SPECIFIED LINE
NUMBER AND CONTINUE EXECUTION OF THE PROGRAM FROM THERE.  GREAT CARE
SHOULD BE TAKEN WHEN A GOTO STATEMENT ENTERS A FOR... NEXT LOOP.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?16




                         IF...THEN

GEN. FORM:     IF  NUMERIC RELATION  THEN  STATEMENT NO.
               OR
               IF STRING RELATION  THEN  STATEMENT NO.


     THE IF...THEN STATEMENT TELLS THE PROGRAM IF THE SPECIFED 
RELATION IS TRUE THEN GO TO THE SPECIFIED LINE NO.  IF THE RELATION
IS NOT TRUE THEN IT DROPS ON THROUGH AND CONTINUES EXECUTION AS NORMAL.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?17




                         IF END

GEN. FORM:    IF END #FILE NO.  THEN  STATEMENT NO.


     THIS STATEMENT TELLS THE COMPUTER THAT IF THE FILE POINTER IS AT
THE END OF FILE MARK THEN TO GO ON TO THE SPECIFIED LINE NUMBER.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?18




                         IF ERROR

GEN. FORM:     IF ERROR THEN STATEMENT NO.


     THE IF ERROR STATEMENT IS USUALLY USED IN COORDINATION WITH THE 
SYS STATEMENT.  IT IS USED TO DETERMINE WHAT ERROR IS OCCURING IN
THE RUNNING OF THE PROGRAM.


ENTER YOUR CHOICE (ENTER 0 TO S             INPUT

GEN. FORM:   INPUT  READ VARIABLE LIST


   THE INPUT STATEMENT  IS USED TO ENTER DATA THROUGH THE KEYBOARD.
A '?' IS PRINTED TO INDICATE YOU NEED TO ENTER DATA.
BOTH NUMERIC AND STRING DATA MAY BE ENTERED.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?20




                         INPUT

GEN. FORM:   INPUT  READ VARIABLE LIST


   THE INPUT STATEMENT  IS USED TO ENTER DATA THROUGH THE KEYBOARD.
A '?' IS PRINTED TO INDICATE YOU NEED TO ENTER DATA.
BOTH NUMERIC AND STRING DATA MAY BE ENTERED.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?21




                         LET

GEN. FORM:     [LET] REPLACEMENT LIST=NUMERIC EXPRESSION
               OR
[LET] DESTINATION STRING=STRING EXPRESSION


     THE LET STATEMENT IS USED TO SET A VARIABLE OR A STRING EQUAL
TO A NUMBER OR AN EXPRESSION.  THIS IS AN EXAMPLE:


                    10 LET B=73


THE 'LET' IS NOT NECESSARY SO YOU COULD SAY '100 B=73'.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?22




                         LINPUT

GEN. FORM:     LINPUT  DESTINATION STRING


     THE LINPUT STATEMENT ALLOWS THE USER TO ENTER AN ENTIRE LINE
OF STRING DATA.  THIS INCLUDES COMMAS,QUOTE MARKS, AND LEADING AND
TRAILING BLANKS.  


ENTER YOUR CHOICE (ENTER 0 TO STOP)?23




                         LINPUT#

GEN. FORM:     LINPUT #FILE NUMBER;DESTINATION STRING


     THIS STATEMENT READS THE NEXT AVALIABLE RECORD INTO A DESTINATION STRING.  AN ASCII FILE MUST BE USED.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?24




                         LOCK

GEN. FORM:     LOCK #FILE NUMBER [,RETURN VARIABLE]


     THE LOCK STATEMENT IS USED TO GIVE YOU EXCLUSIVE ACCESS TO
YOUR FILES.  THE RETURN VARIABLES ARE AS FOLLOWS:



          RETURN VALUE             MEANING
               0         FILE LOCKED SUCCESSFULLY
               1         FILE ALREADY LOCKED
               2         INVALID FILE NUMBER


ENTER YOUR CHOICE (ENTER 0 TO STOP)?25




                         NEXT

REFER TO FOR & NEXT


ENTER YOUR CHOICE (ENTER 0 TO STOP)?26




                         PURGE

GEN. FORM:     PURGE RETURN VARIABLE,FILE DESIGNATOR


     THE PURGE STATEMENT IS USED TO DELETE A FILE FROM THE SYSTEM
IT CAN ONLY BE USED AFTER A FILE IS CLOSED.  


          RETURN VARIABLE          MEANING

               0         FILE SUCCESSFULLY PURGED
               1         FILE IS BUSY CANNOT BE PURGED
               2         FILE NOT ACCESSIBLE
               3         NO SUCH FILE


ENTER YOUR CHOICE (ENTER 0 TO STOP)?27




                         READ

GEN. FORM:     READ  READ VARIABLE LIST


     THE READ STATEMENT READS STRING AND NUMERIC VALUES FROM THE 
DATA STATEMENT.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?28




                         READ#

GEN. FORM:      READ #FILE NO. [,RECORD NO.] [;READ VARIABLE LIST]


     THE READ# STATEMENT READS FROM A FILE LISTED IN THE FILES 
STATEMENT.  THE FILE NO. DETERMINES WHICH FILE WILL BE READ FROM
AND THE READ VARIABLE DETERMINES WHAT TYPE OF DATA CAN BE READ.
STRING DATA CAN'T BE READ WITH A NUMERIC VARIABLE.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?29




                         REM

GEN. FORM:     REM [REMARK]


     THE REMARK STATEMENT IS USED TO ADD REMARKS IN YOUR
PROGRAM.  THESE REMARKS ARE NOT PRINTED OR CARRIED OUT 
DURING THE RUNNING OF YOUR PROGRAM.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?30




                         RESTORE

GEN. FORM:     RESTORE [STATEMENT NUMBER]


     THE RESTORE STATEMENT MOVES THE POINTER BACK TO THE FIRST
ITEM IN THE DATA.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?31




                         STOP

GEN. FORM:     STOP


     THE STOP STATEMENT ENDS EXECUTION OF THE PROGRAM.  IT MAY 
BE INSERTED ANY WHERE IN THE PROGRAM.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?32




                         SYSTEM

GEN. FORM:     SYSTEM RETURN VARIABLE, SOURCE STRING
               OR
               SYSTEM  DESTINATION STRING , SOURCE STRING


     THE STSTEM STATEMENT LETS YOU EXECUTE THE SYSTEM COMMANDS DURING
THE RUNNING OF THE PROGRAM.  THE COMMANDS THAT MAY BE USED ARE:
     BYE, ECHO, MESSAGE, FILE, PROTECT, LOCK, PRIVATE, UNRESTRICT,
     MWA, SWA, & PAUSE.


ENTER YOUR CHOICE (ENTER 0 TO STOP)?33




                         UNLOCK

GEN. FORM:     UNLOCK #FILE NUMBER [,RETURN VARIABLE]


     THE UNLOCK STATEMENT ALLOWS THE FILE TO BE RELEASED TO ALLOW
OTHERS TO REFERENCE THE FILE.  


          RETURN VALUE        MEANING

               0         FILE SUCCESSFULLY UNLOCKED
               1         FILE ALREADY UNLOCKED
               2         FILE NUMBER INVALID


ENTER YOUR CHOICE (ENTER 0 TO STOP)?34




                         UPDATE

GEN. FORM:     UPDATE #FILE NUMBER ; NUMERIC EXPRESSION
               OR
               UPDATE #FILE NUMBER ; SOURCE STRING


     THE UPDATE STATEMENT REPLACES THE NEXT SEQUENTIAL ITEM IN THE
FILE.  THE DATA MUST BE OF THE SAME TYPE WHEN UPDATING AN ITEM
A ASCII FILE CAN NOT BE UPDATED.  IF THE NEW STRING IS LONGER 
THAN THE OLD STRING THEN THE NEW STRING WILL BE CUT OFF AT THE LENGTH
OF THE OLD STRING.  BE VERY CAREFUL WHEN FIRST USING THIS STATEMENT
BECAUSE YOU CAN EASILY RUIN A FILE.


=======================================
=           END OF PHILE              =
=======================================

Downloaded from P-80 Systems......