Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #3168

Re: database prgrams to keep track of things?

Newsgroups comp.sys.apple2.programmer
Date 2016-10-31 22:14 -0700
References (2 earlier) <d98ea7e3-0894-43b6-a41e-e7b52a5e6e58@googlegroups.com> <1c07d449-ad0f-4541-ab6a-2cb40098354d@googlegroups.com> <af13b8af-0b84-4682-96e7-062099652212@googlegroups.com> <6c29a240-6145-4175-8e84-35d5275c08c2@googlegroups.com> <bed3bac0-38ba-4cae-8aa2-2b16d55e9e65@googlegroups.com>
Message-ID <08dbf4ec-1503-46c8-9ddc-9f033b4f52cb@googlegroups.com> (permalink)
Subject Re: database prgrams to keep track of things?
From gids.rs@sasktel.net

Show all headers | View raw


On Monday, October 31, 2016 at 8:16:07 PM UTC-6, roger....@gmail.com wrote:
> On Sunday, October 30, 2016 at 11:02:53 AM UTC-5, gid...@sasktel.net wrote:
> >  290  ON Z = 147 GOTO 500: ON Z < 160 GOTO 210: POKE X(P1),Z:P1 = P1 + 1: ON P1 < LR GOTO 210
> 
> Nice ON GOTO abuse there. Hope I'll never have to use it!
> 
> Hope that Lazarus realizes that the program doesn't read the file it creates, which is the hard part in either Apple II BASIC.


Not really.  Reading a file is almost exactly the same as Writing except you change the command from WRITE to READ, and, PRINT to INPUT and set up a loop until a Read error occurs.  Variable "A" is used as a counter and ends with the total number of records when finished reading.  Like so,

 600 ONERR GOTO 612
 602 A$="filename": A=0: D$ =  CHR$ (4): PRINT D$"OPEN"A$: PRINT D$"READ"A$
 610  FOR I = 0 TO 1: A=A+1: FOR J = 0 TO LM: INPUT AD$(A,J): NEXT : I=0: NEXT
 612  PRINT D$"CLOSE"

The hard parts to program are: to insert, edit or sort records.

Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 03:26 -0700
  Re: database prgrams to keep track of things? Steven Hirsch <snhirsch@gmail.com> - 2016-10-29 09:33 -0400
    Re: database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 11:18 -0700
    Re: database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 11:23 -0700
      Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-29 21:14 -0700
        Re: database prgrams to keep track of things? Lazarus Lukas <lazarusappleprogrammer@gmail.com> - 2016-10-29 22:36 -0700
          Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-30 09:02 -0700
            Re: database prgrams to keep track of things? roger.shimada@gmail.com - 2016-10-31 19:16 -0700
              Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-31 22:14 -0700
              Re: database prgrams to keep track of things? gids.rs@sasktel.net - 2016-10-31 22:46 -0700

csiph-web