| Revision 133,
1.2 KB
checked in by matthiasm, 3 years ago
(diff) |
|
Converted documentation from Japanese into what Google claims to be English. Manually improved a few lines of the translation, but I am not sure if I got it right.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | Extended library |
|---|
| 2 | ------------- |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | ■ protoFILE |
|---|
| 6 | |
|---|
| 7 | Description: The file input and output |
|---|
| 8 | How to use: |
|---|
| 9 | |
|---|
| 10 | / / Extension request for library |
|---|
| 11 | Require ( "protoFILE"); |
|---|
| 12 | |
|---|
| 13 | / / Create a frame |
|---|
| 14 | File: = (_proto: @ protoFILE); |
|---|
| 15 | / / Open (mode refers to a man fopen) |
|---|
| 16 | File: open (path, mode); |
|---|
| 17 | |
|---|
| 18 | / / Output |
|---|
| 19 | File: print (str); |
|---|
| 20 | / / 1 line input |
|---|
| 21 | Line: = file: gets (); |
|---|
| 22 | / / Binary input |
|---|
| 23 | Binary: = file: read (len); |
|---|
| 24 | / / EOF check |
|---|
| 25 | File: eof (); |
|---|
| 26 | / / Seek |
|---|
| 27 | file: seek (offset, whence); / / whence: 'set,' curr or 'end |
|---|
| 28 | / / Retrieve the file pointer |
|---|
| 29 | File: tell (); |
|---|
| 30 | / / File pointer back to 0 |
|---|
| 31 | File: rewind (); |
|---|
| 32 | |
|---|
| 33 | / / Close |
|---|
| 34 | File: close (); |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | ■ protoREGEX |
|---|
| 38 | |
|---|
| 39 | Description: The regular expression |
|---|
| 40 | How to use: |
|---|
| 41 | |
|---|
| 42 | / / Extension request for library |
|---|
| 43 | Require ( "protoREGEX"); |
|---|
| 44 | |
|---|
| 45 | / / Create a regular expression object |
|---|
| 46 | / / You can use regular expressions refer to the man regex |
|---|
| 47 | / / M i and that option is available |
|---|
| 48 | reg: = / regular expression pattern / options; |
|---|
| 49 | |
|---|
| 50 | / / Pattern matching run |
|---|
| 51 | / / Str ... a string of search |
|---|
| 52 | / / Return value fails nil ... |
|---|
| 53 | / / Returns an array ... success (partial matching elements of a string into an array) |
|---|
| 54 | Matchs = reg: match (str); |
|---|
| 55 | |
|---|
| 56 | / / Clean up (NewtonScript do not have a destructor) |
|---|
| 57 | Reg: cleanup (); |
|---|
Note: See
TracBrowser
for help on using the repository browser.