[Overview][Constants][Procedures and functions] | Reference for unit 'pwumain' (#powtils_main) |
Source position: pwumain.pas line 97
function SetCfgVar( |
const name: String; |
const value: String |
):Boolean; |
In later versions of Powtils (1.7.x) you must edit pwinit.pas to initialize the config file to be used (see pwinitall.pas for an example). Therefore if you are not using a config file, this SetCfgVar() function is handy for setting configuration up inside your program, without the need for a text config file.
The web config variables that can be set are:
begin // if we want to halt instead of continuing setcfgvar('error_halt' 'on') outln('Hello <br>'); // we specify an invalid file fileout('badfile.aaa'); // program should halt above, cannot find file outln('<br>'); outln('Did program halt? Is this message visible?'); end.