Model a random access char file
Unlike random access file, methods that deal with positions, length(), seek() etc
will not necessarily count chars - they may be counting bytes.
Model a string in clarion
Internal storage of string uses following parameters:
lState.string - String
lState.chararray - chararray
lState.chararray_len - string len in char array
lState.chararry is the accurate representation.
Model a clarion view
Some observations from experiments with views in clarion 5.5 and
resulting SQL sent to postgres:
When no order is indicated - select is not sorted
Use of positioning etc has not effect reset will reset from top
Ordering is critical for positioning etc.
Remove formatting characters from format
For numeric - remove everything but numeric formatters
For date, convert back to date format
For time, convert back to time format
For picture/key tokens return placeholder tokens
Read mode/state of the connection
NONE - no reading occurring
RESET - file/key is positioned but no reading yet
FORWARD - we are reading forward
BACK - we are reading backwards
RESTORED - we have been restored file that was previously
- either in Forward or Back mode, but we have not
yet fully restored iterator position
(iterator restore is lazy)
USER - user defined SQL was executed
Note that format for dates does not implicitly deformat- because
of risk of confusion between machine greogian date and clarion encoded
date - cannot tell the two apart.
Strictly speaking - SQL yielded will not be equivalent to runtime
evaluation = because of ClarionString insistance on being padded
to its memory defined length.
Get first matching specified record based on order setting
If no record is found - call to position() will yield pointer to
where record should of been found had there been one
Dump directory contents into specified queue
queue format is:
(opt) long name
name
date
time
size
attributes
attribute bitmask is
readonly : 1
hidden : 2
system : 4
directory : 16
archive : 32
Not really clear when is a good time to call records
Should we regenerate filters as part of record get
or assume this has already happened?
Will err on side of no regeneration.
RED -
Static variable in class org.jclarion.clarion.constants.Color
If set then following events will be generated
Move - window moved
Size - window sized
restore - window restored
maximise - window maximised
iconize - window iconized
Convert clarion string into java string
Features of a clarion string
'' = '
<{number}[ohb],*> = ascii character(s)
{number} = repeat last atom number times