My favorites | Sign in
Project Logo
ffl
                
Search
for
Updated Jun 03, 2009 by dvoudheusden
stt  
Stringtable module

Module Description

The stt module implements a stringtable with counted strings. The code is inspired by Wil Badens stringtable.

Module Words

Stringtable syntax words

begin-stringtable ( "<spaces>name" -- stringtable-sys ; n -- c-addr u )

Start a named stringtable definition; return the nth string
+" ( "ccc<quote>" -- )
Parse ccc delimited by double quote and place the string as counted string in the stringtable
end-stringtable ( stringtable-sys -- )
End the stringtable definition

Examples

include ffl/stt.fs


\ Example : the month names in a stringtable


\ Create the stringtable in the dictionary

begin-stringtable months
+" January"
+" February"
+" March"
+" April"
+" May"
+" June"
+" July"
+" August"
+" September"
+" October"
+" November"
+" December"
end-stringtable

\ Fetch strings from the stringtable

0  months type cr       \ January
11 months type cr       \ December



  

    

Generated by ofcfrth-0.10.0

Hosted by Google Code