Jump to content

Photo

XB Game Developers Package


365 replies to this topic

#326 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Sat Aug 18, 2018 5:12 PM

 

Sorry I cannot offer more info.  I can send you the program if you want to try the same process.

Yes, would you PM the programs to me? (XB source code and also the compiled files if you have them both) I can't think of any changes that would make a difference. 

Thanks. 



#327 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • 960 posts
  • Location:Charlton, MA

Posted Sat Aug 18, 2018 7:21 PM

i over wrote the original files when I compiled earlier today.

 

I figured, I'll just load the prior XBGDP and retrace my steps.  Load the non-compiled version and just compile again.

 

Well, tried that 2 times and it worked fine.  Hmmm.  I hate this.  It did it twice last night. But today, no problems.

 

The only difference I can think of, I am usually making changes and play testing in overdrive etc.  But today, I did not make any changes or play test.

I guess, I'll work as normal.  IF/WHEN this crazy behavior occurs, I'll save everything and send it over. 

 

Over Drive does make my system run hot.  I wonder if I have some thermal issues?  It is a laptop, on my lap...  I block the fans often.

Though I haven't noticed other apps failing...  Did get my for BLUE SCREEN yesterday. I was just browsing at the time.   May have left Classic99 running...in OD??  don't remember?



#328 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Sat Aug 18, 2018 7:56 PM

Strange...Well if you can get it to happen again I'd like to see it. 

Read the docs in Frappato about enabling GRAM. That seems to tame the stability problems when running XB256 in cpu overdrive.

It shouldn't be necessary when running a compiled progam.



#329 Bones-69 OFFLINE  

Bones-69

    Chopper Commander

  • 206 posts
  • Location:Australia

Posted Mon Aug 20, 2018 8:12 PM

Harry - Have any thoughts on a possible future release that might support Relative files?



#330 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Tue Aug 21, 2018 5:49 AM

Harry - Have any thoughts on a possible future release that might support Relative files?

Not likely - that would require two things: enough ram and a desire to do it. Both are in very short supply.

 

(edit) Perhaps speech could be implemented somehow. I will look into it over the winter.


Edited by senior_falcon, Tue Aug 21, 2018 3:22 PM.


#331 Bones-69 OFFLINE  

Bones-69

    Chopper Commander

  • 206 posts
  • Location:Australia

Posted Tue Aug 21, 2018 3:41 PM

Not likely - that would require two things: enough ram and a desire to do it. Both are in very short supply.

 

 

Cheers. :)



#332 LASooner ONLINE  

LASooner

    Moonsweeper

  • 301 posts

Posted Tue Aug 21, 2018 5:11 PM

 

 

(edit) Perhaps speech could be implemented somehow. I will look into it over the winter.

 

 

giphy.gif



#333 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Sat Sep 15, 2018 8:46 AM

1980gamer is good at finding little bugs in the compiler. Here's the latest:

 

RND*0 gives the expected value of 0 in BASIC. When compiled it will crash. (All other positive multipliers from 1 to 32767 work fine)



#334 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • 960 posts
  • Location:Charlton, MA

Posted Wed Sep 19, 2018 2:23 PM

Always initialize your variables.

 

Do as I say..  Not as I do!

 

Great Catch senior_falcon.



#335 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,836 posts
  • Location:Portland, Oregon USA

Posted Tue Oct 23, 2018 7:01 PM

100 CALL CLEAR
101 INPUT "3 LETTER AIRPORT CODE:":C$ :: IF LEN(C$)<3 OR LEN(C$)>3 THEN GOTO 100
110 URL$="http://tgftp.nws.noaa.gov/data/observations/metar/decoded/K"&C$&".TXT">
115 REM REPLACE KDEN WITH THE REPORTING STATION YOU CARE ABOUT
120 DIM A$(255)
121 D=0
130 OPEN #1:"PI."&URL$,INPUT ,VARIABLE 80
140 ON ERROR 180
150 D=D+1
160 LINPUT #1:A$(D)
170 GOTO 150
180 CLOSE #1
190 FOR I=1 TO D
200 PRINT A$(I)
210 NEXT I
220 INPUT "AGAIN?(Y/N)":Y$
230 IF SEG$(Y$,1,1)="Y" THEN GOTO 100

works fine in basic.. compiled it seems to try to start working and this is what I see  on the TIPI log:

2018-10-23 17:56:01,481 Pab         : INFO     opcode: Open, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 80, recordNumber: 0
2018-10-23 17:56:01,481 CurlFile    : INFO     open devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT
2018-10-23 17:56:03,145 CurlFile    : INFO     retrieved 501 bytes
2018-10-23 17:56:03,292 Pab         : INFO     opcode: Read, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 80, recordNumber: 0
2018-10-23 17:56:03,292 CurlFile    : INFO     read devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT
2018-10-23 17:56:03,293 CurlFile    : INFO     length of data: 501
2018-10-23 17:56:03,293 CurlFile    : INFO     taking chunk: 0 - 80
2018-10-23 17:56:03,293 CurlFile    : INFO     record fdata len: 80
2018-10-23 17:56:03,410 Pab         : INFO     opcode: Read, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 80, recordNumber: 0
2018-10-23 17:56:03,411 CurlFile    : INFO     read devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/dPORTLANDINTERN
2018-10-23 17:56:03,478 TipiService : ERROR    Unhandled exception in main


Here's a log run in xbasic with the length 254 (I shortened it to 80 when it didn't work compiled) 

2018-10-23 15:43:24,656 Pab         : INFO     opcode: Open, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 254, recordNumber: 0
2018-10-23 15:43:24,656 CurlFile    : INFO     open devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT
2018-10-23 15:43:26,331 CurlFile    : INFO     retrieved 423 bytes
2018-10-23 15:43:26,587 Pab         : INFO     opcode: Read, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 254, recordNumber: 0
2018-10-23 15:43:26,587 CurlFile    : INFO     read devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT
2018-10-23 15:43:26,588 CurlFile    : INFO     length of data: 423
2018-10-23 15:43:26,588 CurlFile    : INFO     taking chunk: 0 - 254
2018-10-23 15:43:26,588 CurlFile    : INFO     record fdata len: 254
2018-10-23 15:43:26,809 Pab         : INFO     opcode: Read, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 254, recordNumber: 0
2018-10-23 15:43:26,810 CurlFile    : INFO     read devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT
2018-10-23 15:43:26,810 CurlFile    : INFO     length of data: 423
2018-10-23 15:43:26,811 CurlFile    : INFO     taking chunk: 254 - 423
2018-10-23 15:43:26,811 CurlFile    : INFO     record fdata len: 169
2018-10-23 15:43:27,010 Pab         : INFO     opcode: Read, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 254, recordNumber: 0
2018-10-23 15:43:27,011 CurlFile    : INFO     read devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT
2018-10-23 15:43:27,011 CurlFile    : INFO     length of data: 423
2018-10-23 15:43:27,160 Pab         : INFO     opcode: Close, fileType: Sequential, mode: Input, dataType: Display, recordType: Variable, recordLength: 254, recordNumber: 0
2018-10-23 15:43:27,160 CurlFile    : INFO     close devname - PI.http://tgftp.nws.noaa.gov/data/observations/metar/decoded/KPDX.TXT


#336 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 23, 2018 9:44 PM

 It looks like you need the TIPI for this, but if not try testing it with a normal TI or classic99. 

How long is URL$? I have a feeling that the buffer I am using is not long enough.

Can a compiled program save to disk on the TIPI?


Edited by senior_falcon, Tue Oct 23, 2018 9:49 PM.


#337 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,836 posts
  • Location:Portland, Oregon USA

Posted Tue Oct 23, 2018 10:09 PM

 It looks like you need the TIPI for this, but if not try testing it with a normal TI or classic99. 

How long is URL$? I have a feeling that the buffer I am using is not long enough.

Can a compiled program save to disk on the TIPI?

 

The URL is in the code there.. I just input the airport code (3 characters) and add it in to the string URL$.  I fixed it so the forum didn't truncate the http's 

 

It does need a TIPI to test..  

I compiled this on classic99 then copied the program files to the TIPI drive..  it should compile on the TIPI drive fine but that's really irrelevant, basically it looks like the filename is getting overwritten in memory after reading in a couple of records, the data in the filename looks like what is received from the file. 

Greg

 

ps: here's the downloaded file:

PORTLAND INTERNATIONAL  AIRPORT, OR, United States (KPDX) 45-35N 122-36W 7M
Oct 24, 2018 - 12:14 AM EDT / 2018.10.24 0414 UTC
Wind: from the ESE (120 degrees) at 5 MPH (4 KT):0
Visibility: 9 mile(s):0
Sky conditions: overcast
Temperature: 55.0 F (12.8 C)
Dew Point: 52.0 F (11.1 C)
Relative Humidity: 89%
Pressure (altimeter): 30.07 in. Hg (1018 hPa)
ob: KPDX 240414Z 12004KT 9SM BKN019 BKN028 OVC060 13/11 A3007 RMK AO2 T01280111
cycle: 4


#338 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,836 posts
  • Location:Portland, Oregon USA

Posted Tue Oct 23, 2018 10:49 PM

i copied that to a text file .. in classic99 just opening the file 'KPDX.TXT" from DSK1. doesn't work compiled..works fine in basic



#339 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Wed Oct 24, 2018 9:10 AM

i copied that to a text file .. in classic99 just opening the file 'KPDX.TXT" from DSK1. doesn't work compiled..works fine in basic

The compiled disk routines use a >40 byte long PAB immediately followed by a >100 byte long buffer. If the PAB is longer than 64 bytes, (which would happen if the file name is longer than 54 bytes), then there will be trouble with the buffer overwriting the PAB.

If you can make it work with a shorter file name then I have a simple fix for you. If it does not work with a shorter file name, as your latest post implies, then any fix would be much harder.



#340 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,836 posts
  • Location:Portland, Oregon USA

Posted Wed Oct 24, 2018 2:56 PM

The compiled disk routines use a >40 byte long PAB immediately followed by a >100 byte long buffer. If the PAB is longer than 64 bytes, (which would happen if the file name is longer than 54 bytes), then there will be trouble with the buffer overwriting the PAB.

If you can make it work with a shorter file name then I have a simple fix for you. If it does not work with a shorter file name, as your latest post implies, then any fix would be much harder.

 

yes I tried it with just a filename of DSK1.KPDX.TXT  and it fails with a file record size of 254.  I have no log to fall back on on classic99.

 

Greg



#341 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Sun Oct 28, 2018 7:46 PM

I've played around with this a little bit and have it working on Classic99. Whether that success will transfer to TIPI remains to be seen. 

Here's what I did:

First I copied your downloaded file for Portland International Airport into a text editor. I then saved that under the name "PIA.TXT"  to the folder I am using as DSK1. This gives the XB program something to read.

Then I modified the XB program to open DSK1.PIA.TXT and all worked as expected in XB, but it was not quite right when compiled. After looking at your code I realized that you were using ON ERROR to determine when you are at the end of the file. XB lets you do this, but as often happens, the compiler is more particular. It wants you to use EOF (which is a better way to do it anyway).  With that change both the XB and compiled programs work identically.

Here's the modified program:


100 CALL CLEAR
110 INPUT "3 LETTER AIRPORT CODE:":C$ :: IF LEN(C$)<>3 THEN 100
120 DIM A$(255)
130 D=0
140 ON ERROR 100
150 OPEN #1:"DSK1."&C$&".TXT",INPUT ,VARIABLE 80
160 D=D+1
170 LINPUT #1:A$(D)
180 IF EOF(1)THEN 210
190 PRINT A$(D) remove this line - I used it for testing and accidentally left it in
200 GOTO 160
210 CLOSE #1
220 FOR I=1 TO D
230 PRINT A$(I)
240 NEXT I
250 INPUT "AGAIN?(Y/N)":Y$
260 IF SEG$(Y$,1,1)="Y" THEN GOTO 100
 

You can enter PIA and it will read the data from disk and print it on the screen. If you enter something else it causes an error because the file doesn't exist and the program goes to line 100.

Give those changes a try and let me know what happens with the TIPI.

 

EDIT - I was using line 190 for testing and forgot to remove it. It should not be there.


Edited by senior_falcon, Mon Oct 29, 2018 7:46 PM.


#342 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Mon Oct 29, 2018 7:49 PM

I thought I understood what your code was doing, but apparently not. After creating the PIA.TXT file as described above, paste this modified version of your program into XB using Classic99:

100 CALL CLEAR
101 INPUT "3 LETTER AIRPORT CODE:":C$ :: IF LEN(C$)<>3 THEN GOTO 100
120 DIM A$(255)
121 D=0
130 OPEN #1:"DSK1."&C$&".TXT",INPUT ,VARIABLE 80
140 ON ERROR 180
150 D=D+1
160 LINPUT #1:A$(D)
170 GOTO 150
180 CLOSE #1
190 FOR I=1 TO D
200 PRINT A$(I)
210 NEXT I
220 INPUT "AGAIN?(Y/N)":Y$
230 IF SEG$(Y$,1,1)="Y" THEN GOTO 100

Type TRACE, then RUN and enter PIA at the prompt. The program never gets to line 180. It goes from 150>160>190>200 and never closes the file. I don't know why line 180 is skipped

 

In the program I posted above (Post 341) that uses EOF, trace shows the program functioning as expected - when at the end of the file it goes to line 210 to close the file, then 220 etc.

 

EDIT - It turns out there is a bug in TRACE. Line 180 actually is executed but that is not reported by TRACE.


Edited by senior_falcon, Tue Oct 30, 2018 5:36 AM.


#343 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,836 posts
  • Location:Portland, Oregon USA

Posted Tue Oct 30, 2018 11:55 AM

tipi doesn't support EOF()  gives me error 92 on the if EOF statement. Probably because it has no idea what the file size is.. it just grabs blocks at a time off the website.. 

 

Greg



#344 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,836 posts
  • Location:Portland, Oregon USA

Posted Tue Oct 30, 2018 1:08 PM

Ok i let Matt know about the issue. He's going to work on adding eof to that file handle routine

Sent from my LG-H872 using Tapatalk

#345 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 30, 2018 1:36 PM

I will take a look at how XB handles EOF vs ERROR to see which comes first. Perhaps I can modify the compiler to behave like XB.

 

It seems that it is both "end of file" and also "error" at the same time.


Edited by senior_falcon, Tue Oct 30, 2018 2:09 PM.


#346 RXB ONLINE  

RXB

    River Patroller

  • 3,365 posts
  • Location:Vancouver, Washington, USA

Posted Tue Oct 30, 2018 3:06 PM

Well thought you guys might be interested in the GPL code for EOF:

0733]               ***********************************************************
[0734]               *                    CLOSE ROUTINE
[0735]               * Syntax could be
[0736]               * CLOSE #{ num exp }  or CLOSE #{ num exp }:DELETE
[0737]               *
[0738]               * Possibly output pending records before closing or
[0739]               * deleting the file.
[0740]               ***********************************************************
[0741] 8196 06,93,55 CLOSE  CALL CHKFN             Check for "no #" / "#0" cases
[0742] 8199 77,D7           BS   ERRFE             Not for "CLOSE" you don't
[0743] 819B 06,93,71        CALL CHKCON            Check file number etc...
[0744] 819E 57,D7           BR   ERRFE             *** FILE NUMBER NOT IN SYSTEM
[0745] 81A0 06,93,90        CALL OUTEOF            Output pending records
[0746] 81A3 BE,E0,04        ST   CZCLOS,V@COD(@PABPTR) Default to CLOSE I/O code
       81A6 04,01
[0747] 81A8 D6,42,B5        CEQ  COLONZ,@CHAT      Check for ":DELETE" spec.

99/4 GPL-ASSEMBLER (Pass 3) correct                                   PAGE 0013 
FLMGR-359
[0748] 81AB 41,B8           BR   G81B8
[0749] 81AD 0F,79           XML  PGMCHR            Request next input token
[0750] 81AF 0F,7E           XML  SPEED             Must be at a
[0751] 81B1 00              BYTE SYNCHK          *  "DELETE" else
[0752] 81B2 99              BYTE DELETZ          *   its an error
[0753] 81B3 BE,E0,04        ST   CZDELE,V@COD(@PABPTR) Change CLOSE to DELETE
       81B6 04,07
[0754] 81B8 06,95,AD G81B8  CALL CHKEND            EOS?
[0755] 81BB 41,09           BR   ERRSYN            NO:SYNTAX ERROR
[0756] 81BD 06,97,6B        CALL CDSR              Call DSR with whatever we hav
[0757] 81C0 41,C7           BR   CLOSZ1            Reset means error....
[0758] 81C2 06,93,A6        CALL DELPAB            Delete PAB and data-buffer
[0759] 81C5 0F,75           XML  CONT              Return to parser routine
[0760] 81C7 BD,5C,E0 CLOSZ1 DST  V@4(@PABPTR),@ARG Save error code for message
       81CA 04,04
[0761] 81CC 06,93,A6        CALL DELPAB            Now delete the PAB
[0762] 81CF BD,04,40        DST  @FREPTR,@PABPTR   Store error-code in free memo
[0763] 81D2 A7,04,00        DSUB 6,@PABPTR         Create standard size PAB
       81D5 06
[0764] 81D6 BD,E0,04        DST  @ARG,V@4(@PABPTR) Copy error-code
       81D9 04,5C
[0765] 81DB 57,BB           BR   ERRIO             Exit to error-routine
[0766]               ***********************************************************
[0767]               *                   CLOSE ALL ROUTINE
[0768]               * CLOSE all the existing PABs ... ignore errors
[0769]               *
[0770]               * NOTE: "CLSLBL" is used in the I/O error routine to
[0771]               *       determine if a warning should be given rather than
[0772]               *       an error.
[0773]               ***********************************************************
[0774] 81DD BD,04,B0 G81DD  DST  V*PABPTR,@PABPTR
       81E0 04
[0775] 81E1 8F,B0,04 CLSAZ0 DCZ  V*PABPTR          Find last PAB in chain
[0776] 81E4 41,DD           BR   G81DD
[0777] 81E6 06,93,90        CALL OUTEOF            Take care of pending records
[0778] 81E9 BE,E0,04 CLSLBL ST   CZCLOS,V@COD(@PABPTR) Select CLOSE code
       81EC 04,01
[0779] 81EE 06,97,6B        CALL CDSR              CLOSE to DSR routine
[0780] 81F1 06,93,A6        CALL DELPAB            Delete PAB - ignore CLOSE err
[0781] 81F4 BD,04,3C CLSALL DST  @IOSTRT,@PABPTR   Start at beginning of chain
[0782] 81F7 8F,3C           DCZ  @IOSTRT           Continue until done
[0783] 81F9 41,E1           BR   CLSAZ0
[0784] 81FB 00              RTN                    And return

EOF routine:

[2698]               ***********************************************************
[2699]               *                         EOF ROUTINE
[2700]               * EOF(X) returns status codes on file X. The meaning of the
[2701]               * result codes is:
[2702]               *           -1  Physical End Of File
[2703]               *            0  Not at End Of File yet
[2704]               *            1  Logical End Of File
[2705]               ***********************************************************
[2706] 91DE BD,5C,04 EOF    DST  @PABPTR,@ARG      Save the current PAB and set
[2707]               *                              the new one in SUBEOF
[2708] 91E1 06,92,1E        CALL SUBEOF            Try to find the PAB somewhere
[2709] 91E4 57,D7           BR   ERRFE             Can't file
[2710] 91E6 BE,5E,09        ST   CZSTAT,@ARG2      Select status code without
[2711] 91E9 C0,E0,04        EX   @ARG2,V@COD(@PABPTR) destorying original code
       91EC 04,5E
[2712] 91EE 06,97,65        CALL IOCLZ1            Get the info from DSR
[2713] 91F1 C1,04,5C        DEX  @ARG,@PABPTR      Restore original PAB and orig
[2714] 91F4 BC,E0,04        ST   @ARG2,V@COD(@ARG)  I/O code
       91F7 5C,5E
[2715] 91F9 BC,5E,E0        ST   V@SCR(@ARG),@ARG2 And pick up STATUS
       91FC 0C,5C
[2716] 91FE 31,00,08        MOVE 8,G@FLOAT1,@FAC   Get floating 1
       9201 4A,92,16
[2717] 9204 DA,5E,03        CLOG 3,@ARG2           Test EOF bits
[2718] 9207 72,12           BS   EOFZ2             No EOF indication
[2719] 9209 DA,5E,02        CLOG 2,@ARG2           Physical EOF
[2720] 920C 72,10           BS   G9210
[2721] 920E 83,4A           DNEG @FAC              Make result -1
[2722] 9210 0F,75    G9210  XML  CONT
[2723] 9212 87,4A    EOFZ2  DCLR @FAC              Create result 0
[2724] 9214 0F,75           XML  CONT
[2725] 9216 40,01,00 FLOAT1 BYTE >40,1,0,0,0,0,0,0   * Floating point -1
       9219 00,00,00
       921C 00,00
[2726] 921E D6,42,B7 SUBEOF CEQ  LPARZ,@CHAT       * SYNTAX ERROR
[2727] 9221 41,09           BR   ERRSYN
[2728] 9223 0F,74           XML  PARSE             Parse up to the matching ")"
[2729] 9225 FF              BYTE >FF
[2730] 9226 06,93,5C        CALL CHKCNV            Convert and search for PAB
[2731] 9229 77,CB           BS   ERRBV             Avoid 0's and negatives bad v
[2732] 922B BC,62,17        ST   @DSRFLG,@ARG6     @DSRFLG got changed in CHKCON
[2733] 922E 06,93,71        CALL CHKCON            Check and search tiven filenu
[2734] 9231 BC,17,62        ST   @ARG6,@DSRFLG     @DSRFLG to changed CHKCON
[2735] 9234 01              RTNC                   Condition set : file # exists
[2736]               ***********************************************************

Ok now I have previously posted the sections on ON ERROR line-number bur could post them again if requested.



#347 RXB ONLINE  

RXB

    River Patroller

  • 3,365 posts
  • Location:Vancouver, Washington, USA

Posted Tue Oct 30, 2018 3:08 PM

P.S.

You should notice that CLOSE ignores all ERRORS and thus if something went wrong you would never know it.



#348 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,322 posts
  • HarmlessLion
  • Location:BUR

Posted Tue Oct 30, 2018 4:17 PM

EOF was a pain to get reporting correctly in Classic99 ;) Glad to see I'm not alone!



#349 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,692 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Tue Oct 30, 2018 4:24 PM

It seems EOF should not be difficult to implement for TCP connections based upon whether the connection is still open.  Of course, the problem is that not-EOF does not necessarily mean data is available.  Does the TI know how to handle null bytes?  If so, then while not EOF an INPUT against an empty buffer could return 0x00.

 

For http/s connections it should be pretty cut-and-dry unless the request is pipelined, in which case the connection to the server stays open after one request has completed to wait for the next request.



#350 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • Topic Starter
  • 1,262 posts
  • Location:Lansing, NY, USA

Posted Tue Oct 30, 2018 7:38 PM

I'm beginning to get a handle on what is going on with the compiler. When Arcadeshopper's program encounters an error (i.e. it tries to read a nonexistent line in the file) it sends the program to line 180 where the file is closed; then the program continues. After the first error ON ERROR is cleared so if there is another error the program will break. When the program is compiled there is an error in CLOSE #1 in line 180 but only if it was an error that sent it to line 180 and that cause the program to break.

If EOF sends it there it does not cause an error and line 180 is closes #1 properly. 

I have a feeling that something in the PAB should be cleared after the first error so that CLOSE can work properly. Will know more soon...






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users