home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / ref / ba01g.do < prev    next >
Text File  |  2006-10-19  |  6KB  |  174 lines

  1.  
  2.  Title: FILES (RAM)
  3.  
  4.  
  5. All files are the result of digitized input, at one time or another.  Files 
  6. are written-to, and read-from.  Reading from a file is non-destructive, 
  7. whereas writing to a file may be destructive.  Destructiveness depends on 
  8. whether the process of writing to a file is replacing the given file's current 
  9. contents, or appending to those contents. 
  10.  
  11. Files stored in RAM (random access memory) are not permanent.  Any serious 
  12. loss of power, corruptive power surge, or uncontrolled process may damage, or 
  13. eliminate the contents of files stored in RAM.  It is imperative that this 
  14. last statement be understood.  The practice of writing the contents of RAM 
  15. files to a less electrically active storage media is highly recommended, i.e. 
  16. tape, disk, etc. 
  17.  
  18. RAM filenames consist of a string of one to six characters, the first of which 
  19. is a letter.  In addition, most RAM files have specific extensions which are 
  20. suffixed to the filename.  These extensions are:
  21.  
  22.  .BA  BASIC program file
  23.  .DO  ASCII formatted file (a BASIC data file, a TEXT editor file, certain 
  24.       BASIC program files).
  25.  .CO  command file (a machine-language file).
  26.  
  27. NOTE: Most commands which allow you to specify a device (such as LCD, MDM, and 
  28.       so on) default to RAM.  In addition, BASIC can often assume the 
  29.       extension of a file from the context of the command. 
  30.  
  31.  
  32. CLOSEfilenumberlist
  33.  Closes the files OPEN'ed as filenumber. 
  34.  
  35.  
  36. EOF(filenumber)
  37.  Tests for an end-of-file condition on the RAM file OPEN'ed as filenumber.  
  38.  The function returns a "logical" answer, either "true" (-1) if you have 
  39.  reached the end of the file, or else "false" (0) if you have not reached the 
  40.  end of the file.
  41.  
  42.  
  43. INPUT#filenumber,variablelist
  44.  Inputs data sequentially from the RAM file OPEN'ed s filenumber.
  45.  
  46.  
  47. INPUT$(numericexpression,filenumber)
  48.  Returns a string of a length given by numericexpression from the RAM file 
  49.  OPEN'ed as filenumber.
  50.  
  51.  
  52. IPL"filename"
  53.  Defines the RAM filename as the warm-startup program (that is, the program 
  54.  which runs immediately when you turn on the computer).
  55.  
  56.  
  57. KILL"filename"
  58.  Deletes the RAM file filename.  You must include the file's extension.
  59.  
  60.  
  61. LINEINPUT#filenumber,stringvariable
  62.  Reads a line of text into stringvalue from device named as filenumber.
  63.  
  64.  
  65. LOAD"RAM:filename",R
  66.  Loads a BASIC program from RAM.  If R is present, BASIC runs the program 
  67.  after it has been loaded. 
  68.  
  69.  
  70. LOADM"RAM:filename"
  71.  Loads the machine-language program filename from RAM at the address specified 
  72.  when it was saved.
  73.  
  74.  
  75. MAXFILES
  76.  Stores the current maximum number of files.  You may access MAXFILES line any 
  77.  numeric variable. 
  78.  
  79.  
  80. MERGE"RAM:filename"
  81.  Merges the lines from the ASCII formatted RAM file called filename with the 
  82.  lines of the current program.
  83.  
  84.  
  85. NAME"RAM:oldfilename"AS"RAM:newfilename"
  86.  Renames oldfilename to newfilename.  You must include the file's extension.
  87.  
  88.  
  89. OPEN"RAM:filename"FORmodeASfilenumber
  90.  Allocates a buffer, filenumber, for a RAM file called filename.  Mode can be 
  91.  OUTPUT, specifying data will be written sequentially to the file, starting at 
  92.  the beginning of the file, INPUT, specifying data will be read sequentially 
  93.  from the file, starting at the beginning of the file, or APPEND, specifying 
  94.  that data will be written sequentially to the file, adding records to the end 
  95.  of the file.
  96.  
  97.  
  98. PRINT#filenumber,expressionlist
  99.  Writes the values of expressionlist to the RAM file OPEN'ed as filenumber. 
  100.  
  101.  
  102. PRINT#filenumber,USING"format";expressionlist
  103.  Formats the data in expressionlist and sends it to the RAM file OPEN'ed as 
  104.  filenumber.  Format consists of one of more of the following "field 
  105.  specifiers": 
  106.  
  107. Prints first string character.
  108.  PRINT#1,USING"!";"Tandy"
  109.  
  110. Prints 2+n characters from a string.
  111.  PRINT#1,USING"\\";"Tandy"
  112.  
  113. Print one digit for each #.
  114.  PRINT#1,USING"#####";5
  115.  
  116. Inserts the algebraic sign of the number.
  117.  PRINT#1,USING"+####";-13
  118.  
  119. Inserts a minus sign either at the beginning or end of negative numbers.  
  120.  PRINT#1,USING"-####";14 
  121.  
  122. Converts leading blanks to leading asterisk blanks.
  123.  PRINT#1,USING"**#####";145 
  124.  
  125. Inserts a dollar sign to the immediate left of the formatted number.  
  126.  PRINT#1,USING"$$#####";450 
  127.  
  128. Changes leading spaces to asterisks except for the space to the immediate left 
  129. of the number, where is inserts a dollar sign. 
  130.  PRINT#1,USING"**$###";12 
  131.  
  132. Inserts a decimal point.
  133.  PRINT#1,USING"#####.##";14.5
  134.  
  135. Inserts a comma before every three printed digits to the left of the decimal 
  136. point. 
  137.  PRINT#1,USING"#########,";14432
  138.  
  139. Prints the number in exponential format.
  140.  PRINT#1,USING"###.##^^^^";342200 
  141.  
  142.  
  143. RUN"RAM:filename",R
  144.  Clears all variables, loads the BASIC program called filename from RAM, and 
  145.  then executes the program.  If R is present, BASIC keeps all open files open.  
  146.  If R is omitted, BASIC closes all open file before loading filename.
  147.  
  148.  
  149. RUNM"RAM:filename"
  150.  Loads and executes the machine-language program stored as filename.  The 
  151.  program must be one executable from the menu, not a BASIC subroutine.  In 
  152.  addition, when the program is loaded, BASIC closes all open files.
  153.  
  154.  
  155. SAVE:RAM:filename",A
  156.  Writes the current BASIC program to the RAM file called filename.  A is 
  157.  optional; if used, BASIC saves the file in ASCII format.  Otherwise BSIC 
  158.  saves the file in a compressed binary format (also called tokenized)  If 
  159.  filename already exists in RAM, BASIC writes over the old file.
  160.  
  161.  
  162. SAVEM"RAM:filename",startaddress,endaddress,entryaddress
  163.  Writes the machine-language program stored from startaddress to endaddress 
  164.  into RAM, under the name filename.  Entryaddress is optional; if not present, 
  165.  then BASIC assumes that the program entryaddress is the same as the 
  166.  startaddress. 
  167.  
  168.  
  169. TAB(numericexpression)
  170.  Writes numericexpression spaces before writing the next data item.  
  171.  Numericexpression spaces between 0 and 255. 
  172.  
  173. <EOF>
  174.