home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / apl / 1241 < prev    next >
Encoding:
Text File  |  1992-12-13  |  2.3 KB  |  69 lines

  1. Newsgroups: comp.lang.apl
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!sfsuvax1.sfsu.edu!emclean
  3. From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
  4. Subject: Enhancing J file capabilities 
  5. Message-ID: <1992Dec13.070025.2011@csus.edu>
  6. Sender: news@csus.edu
  7. Organization: San Francisco State University
  8. Distribution: NA
  9. Date: Sun, 13 Dec 1992 07:00:25 GMT
  10. Lines: 57
  11.  
  12.    Suppose I am writting an application with the following data:
  13.  
  14.    a =. 'Montana';'Simms';'Elway'
  15.    b =. 'Tyler';'Metcalf';'Thomas'
  16.    c =. 'Rice';'Lofton';'Duper'
  17.    d =. 'Young';'Kreig';'Everett'
  18.  
  19.    With the verbs:
  20.  
  21.    append =. '((10{a.) ,~ 5!:3 <'''',y.,'''') 1!:3 < x.':11
  22.    write =. '((10{a.) ,~ 5!:3 <'''',y.,'''') 1!:2 < x.':11
  23.    read  =. >@(<&}:;.2)@(1!:1&<)
  24.  
  25.    Using the following instructions: 
  26.  
  27.    'ftblplyrs' write 'a'
  28.  
  29.    'ftblplyrs' append 'b'
  30.  
  31.    'ftblplyrs' append 'c'
  32.  
  33.    So that: 
  34.  
  35.    read 'ftblplyrs'
  36. 52xba 1 3 14c- 1 7 Montana12c- 1 5 Simms12c- 1 5 Elway 
  37. 53xbb 1 3 12c- 1 5 Tyler14c- 1 7 Metcalf13c- 1 6 Thomas
  38. 50xbc 1 3 11c- 1 4 Rice13c- 1 6 Lofton12c- 1 5 Duper   
  39.    
  40.    Now, once this information is stored in the file, the user
  41.    logs out and then back in again, and at this point is
  42.    prompted for for a file name. In this instance he selects
  43.    "ftblplyrs" so he can access and revise information in the file.
  44.  
  45.    Basically, I'd like to have a set of programs,
  46.    perferably J verbs, which would let me write an
  47.    application like I've described. That is,
  48.    providing the file capabilities of Manugistics mainframe 
  49.    (and for what I know PC) APL.
  50.  
  51.    If (miraculously) anyone has a set of programs which does
  52.    this and is willing to share it that would be great!
  53.  
  54.    As I imagine this is not the case, if I set out to program
  55.    this myself, I'd like some pointers. Is the best
  56.    way to approach it to write it C++? (If so, is there 
  57.    publically available application whose code I might reuse
  58.    or study?) Or can I use existing J verbs, keying on
  59.    the line feeds and appending an "erase to end of line" character
  60.    after the end of each revision?   ( Obviously file
  61.    locking capabilities would have to be coded in C++.)
  62.  
  63.    As an aside, can the "write", shown above be written
  64.    so the noun variables do not have to be passed by name?
  65.  
  66.    Thanks!
  67.  
  68.    Emmett.
  69.