mnelson@cbnewsl.att.com (michael.c.nelson) (03/11/91)
I've been having some trouble with random files in comal. Anyone out there still use it? I have an old c64 (an early one with the buggy video, tan case) and an old 1541 (white case!). Comal version is 0.14. Anyway, I open a random file (or relitive in CBM's view) write some stuff and read it back. Sometimes it's OK but then the first block will develop a problem of everyother variable (floating points: 5 bytes) is 0. The following is a typical scenario: - Use 'Comal Handbook' example to create and write random file. (I added a few extra fp variables) - Use 'Comal Handbook' example to read random files. - Everything's OK. - execute: open file 3,"0:e.dat",read close // This opens the file as seq then closes it. - Rerun the write and read programs and the data comes back trashed. The problem occurs with writing the data. I've edited the disk to add the missing data and read always seems to work. One really strange thing is that if I create a new random file the problem will repeat, ie. the data is OK the first couple of times then gets corrupted. BUT, if I delete the file, even change the name, but it ends back up at the same disk block as the old file, the problem appears immediately. Any idea what's going on? I understand there were bugs in the old 4040 drives with relative files. I understand that the 1541 is based off this drive. Could some of the 4040 problems made it into the 1541? Mike Nelson AT&T Bell Laboratories Naperville IL USA