Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000375 | mercury | Bug | public | 2015-01-19 14:52 | 2015-01-21 01:07 |
Reporter | lpimmes | ||||
---|---|---|---|---|---|
Assigned To | |||||
Priority | urgent | Severity | major | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | OSx 10.9 | OS | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000375: io.seek_binary_output(Stream, set, 32, Out3, Out4), % rec1 NOT working | ||||
Description | Seeking to an offset, the second record, in binTest file and then writing new results only writes a single record. Initially three records present; now only a single record remains. Any ideas? Thanks. This invites the question: overwrite record at position, versus insert new record at seek position. | ||||
Steps To Reproduce | Change true/false switches in main/2 to achieve results for test: 1 write binTest, true, false 2 false, true read binTest at offset, record 2, OK 3 false, false write to binTest at offset, record 2; fails. % ioBinFile 522>which mmc % /usr/local/mercury-14.01/bin/mmc % ioBinFile 511>./ioBinFile % Opened 'binTest' successfully. % Offsets rec0: 0, rec1: 32, rec2: 62. % ioBinFile 513>cat binTest % rec("The man ran home.", 3092). % rec("The girl saw me.", 312). % rec("Each person saw you.", 532). % set to false, recompile main/2 % ioBinFile 517>./ioBinFile % Opened 'binTest' successfully. % Offset after seek: 32. % Read record: rec('The girl saw me.', 312) % Not working, just record output; first and third one removed. % false, false; default last term in if / then / else % ioBinFile 521>./ioBinFile % Opened 'binTest' successfully for seek writing. % Stream name: binTest; seek to position: 32. % ioBinFile 521>cat binTest % rec("Dr. Smith", 3). | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ioBinFile.m (4,993) 2015-01-19 14:52 https://bugs.mercurylang.org/file_download.php?file_id=234&type=bug |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2015-01-19 14:52 | lpimmes | New Issue | |||
2015-01-19 14:52 | lpimmes | File Added: ioBinFile.m | |||
2015-01-20 12:33 | juliensf | Note Added: 0000805 | |||
2015-01-21 01:07 | lpimmes | Note Added: 0000806 |