new (may be not new) Sedoric bug found (all versions)

This is the best place to discuss about the various Oric operating systems like Sedoric, Randos, FT-Dos, and others.
Post Reply
User avatar
waskol
Flight Lieutenant
Posts: 331
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

new (may be not new) Sedoric bug found (all versions)

Post by waskol » Thu Aug 30, 2007 4:30 pm

In "Sedoric à nu" of Andre Cheramy, I saw that there was a problem preventing to use the DIM commans between an OPEN and a CLOSE (file access).

Well, I think I saw another one...

Between an OPEN and a CLOSE, you cannot USE any multi-dimensional array of integer.

For instance :

Code: Select all

10 DIM T%(10,10)
20 OPEN S,"FILE.BIN",1:REWIND 1
30 FOR I=0 TO 10
40 FOR J=0 TO 10
50 TAKE 1,R%
60 T%(I,J)=R%:' <---BUG !!! (BAD RECORD NUMBER....)
70 NEXT J
80 NEXT I
90 CLOSE 1
With a one-dimensional array of integer, it's OK :

Code: Select all

10 DIM T%(10)
20 OPEN S,"FILE.BIN",1:REWIND 1
30 FOR I=0 TO 10
50 TAKE 1,T%(I)
80 NEXT I
90 CLOSE 1
With a multi-dimensionnal array of floating values, it works too :

Code: Select all

10 DIM T(10,10)
20 OPEN S,"FILE.BIN",1:REWIND 1
30 FOR I=0 TO 10
40 FOR J=0 TO 10
50 PUT 1,T(I,J)
70 NEXT J
80 NEXT I
90 CLOSE 1
It took me 3 days to understand what was going wrong with my array of integers !!!

User avatar
Dbug
Site Admin
Posts: 2303
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Thu Aug 30, 2007 5:34 pm

I wonder if these bugs are comming from the ROM side of things, or in the Sedoric implementation.

This kind of things could motivate the creation of a new release of Sedoric :)

User avatar
waskol
Flight Lieutenant
Posts: 331
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol » Thu Aug 30, 2007 9:24 pm

Hello DBUG :P

In facts, :in "SEDOIC à nu", Andre points out very well that in the current and past implementations of the SED, that when the OPEN command is treated, a new array named FI is created along side those already existing in the Oric memory part that deals with arrays created in BASIC.
In fact, this new array is inserted (and not append) just before the other arrays, then removed once you have CLOSEd all the files.

Andre states also that the way it is managed (during a PUT or a a TAKE), or the way the other arrays are managed (elsewhere between the OPEN and the CLOSE) are done a little bit "à la hussarde" (excuse me for that french expression). For this reason, Andre tells to never use a DIM statment between an OPEN and a CLOSE.
I think that the same implementation brings some problems with multidimmensionnal arrays of integer values. :wink:

Andre, if you read me... may be I brought you the clue you needed to solve this for a SEDORIC v4 :wink:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest