File api ANSI » History » Version 1
iri, 12/17/2011 09:19 PM
| 1 | 1 | iri | h1. File api ANSI |
|---|---|---|---|
| 2 | |||
| 3 | Files are not loaded in Scol memory. |
||
| 4 | |||
| 5 | http://www.scolring.org/files/doc_html/ansi_files.html |
||
| 6 | |||
| 7 | <pre> |
||
| 8 | typeof myFile = File;; |
||
| 9 | |||
| 10 | fun main ()= |
||
| 11 | _showconsole; |
||
| 12 | |||
| 13 | set myFile = _FILEOpen _channel "myFolder/myFile.ext"; |
||
| 14 | _fooS strcat "Size = " itoa _FILESize myFile; |
||
| 15 | _FILESeek myFile 50 0; |
||
| 16 | _fooS _FILERead myFile 20; |
||
| 17 | _FILESeek myFile 10 0; |
||
| 18 | _fooS _FILERead myFile 25; |
||
| 19 | _FILEClose myFile; |
||
| 20 | 0;; |
||
| 21 | </pre> |
||
| 22 | |||
| 23 | Author : iri |
||
| 24 | Date : december 2011 |
||
| 25 | |||
| 26 | *Return to [[Examples]]* |