Msg: 5726 *Conference*

03-27-95 06:21:58

From: CARROLL LEWIS

To : ALL

Subj: VARPTR

        I have been developing a program to organize jobs offered in the want
ads of my local papers. The info I'm tracking is kept in two files: 

        The first has just the phone number, date, source, type, and status.

(I'm entering the nursing field..type is hospc, angcy, SNF, LTC..etc and does
not change. However the status...Not called, Called, Applied, Worked ...does
and this is where my problem has come from. 

        I was hoping to be able to change the "status" in the first file by
utilizing VARPTR and then a looped poke to change "NO call" to "Applied".  I've
written the program so that the "status" data in the file is always seven
bytes.(The idea being that I would not change the size of the file or
over-write a comma in the line.) The "test" program I wrote, with the help from
pg 470 in DAVID A. LIEN's,..MODEL 100 PORTABLE COMPUTER..works just fine, but
when installed as a gousb in my program does not change the file data. Attempts
to use "VARPTR(file buffer)"  results in a syntax error.
 
        ANYBODY HAVE ANY IDEA'S..SOLUTIONS..SUGGESTIONS???
        
        In the meantime I'm just rewritting the file everytime there is a
change.
 
        Here's the test program: (Line 20 changes every time this is run.)
 
 10 :CLS
 20 A$=" Called"
 30 X=VARPTR(A$)
 40 PRINTA$:PRINTX
 50 L=PEEK(X+1)+256*PEEK(X+2):PRINTL
 60 LE=PEEK(X):PRINT"len ";LE;A$
 70 PRINT"new status 1=called 2=applied 3=worked
 80 NC$=INKEY$:IFNC$=""THEN80
 90 IFNC$="1"THEN RESTORE100:GOTO94
 91 IFNC$="2"THEN RESTORE200:GOTO94
 92 IFNC$="3"THEN RESTORE300:GOTO94
 93 GOTO80
 94 IF LEN(A$)<>LE THEN BEEP:PRINT"something's WRONG!!":STOP
 99 FORI=LTOL+6:READN:POKEI,N:NEXT:GOTO500
 100 DATA32,67,97,108,108,101,100
 200 DATA65,112,112,108,105,101,100
 300 DATA32,87,111,114,107,101,100
 500 PRINTA$

     -CARROLL-