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