Using ::SHE+ILA::'s Dictionary

Elegant Woman in Purple Gown at Antique Table
35
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    DaVinci2
  • Access
    Public
  • Created
    1d ago
  • Try

More about Using ::SHE+ILA::'s Dictionary

(Also see the descriptions in the other two Dictionary artworks.) A new word can be programatically added to the system dictionary, or to a particular user dictionary, by use of the "[!]" (Quad-Bang) operator. For example
atom <:: mydict [!] ("wooees")
or atom <:: [!] ("wooees", classatom, flags)
If the "mydict" operand is supplied, it is the reference to an alternative dictionary. If the "classatom" parameter is supplied, it states the atom which describes the class of this word (for example "CAR" and "TRAIN" are instances of "VEHICLE". This can be used for procedural AI prose generation, and text adventure game parsing. If the "flags" parameter is passed, it contains a set of bits which indicate what part-of-speech (noun, verb, adjective, etc.) the word is used as.
The "[?]" (Quad-Query) operator looks up a word in the dictionary, and returns a vector containing its atom (dictionary entry number), class atom, and flags. For example :
result <:: mydict [?] "wooees"
A local "dictionary" (actually an uncompressed one -- a symbol table) is automatically handled by the input editor (ESC) during typing-in of any class / struct / function definition. It is stored as element zero of the Buf (which is why subscripting starts at 1). Modifying one of these entries from the ESC editor, allows correction of mis-spelt variable names, and the next time the source code is listed the corrected spelling will be used throughout. Or of course the source can be rendered difficult to read by setting every variable name to NULL :) Make sure you have a backup first :)
Supplying a segment name to the [?] operator will return the SEGID as an integer in 1_65535, for example :
segid <:: [?] ::MATHS::
Obviously a new segment cannot be created in this way, for security reasons :) A segid of zero will be returned if the segment is not found.

Comments


Loading Dream Comments...

Discover more dreams from this artist