Read a configuration file: Difference between revisions

m
(Initial FutureBasic task solution added)
m (→‎{{header|Wren}}: Minor tidy)
 
(2 intermediate revisions by 2 users not shown)
Line 1,928:
: # ( -- ) 1 PARSE 2DROP ; \ parse line and throw away
: = ( addr --) 1 PARSE trim ROT PLACE ; \ string assignment operator
synonym' ;# alias ; # \ 2nd comment operator is simple
 
FORTH DEFINITIONS
Line 1,971:
Rhu Barber
Harry Barber ok</PRE>
 
Note that parsing a config file using the forth text interpreter this way is probably only safe if you are the only one that edits the config file, as it can execute any forth word.
 
=={{header|Fortran}}==
Line 2,227 ⟶ 2,229:
fn SaveConfiguration
fn ReadConfiguration
 
NSLog( @"%@", fn WindowPrintViewString( 1 ) )
 
HandleEvents
Line 5,807:
{{libheader|Wren-ioutil}}
Includes 'seeds removed' in the map (with a default value of false) even though it's commented out of the configuration file.
<syntaxhighlight lang="ecmascriptwren">import "io" for File
import "./ioutil" for FileUtil
 
class Configuration {
9,476

edits