Config File

version 2 by Aaron Reed

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Setting the Key/Value Pairs

    typeKind is a kind of value. The typeKinds are tNumeric, tBoolean, or tString.
    theType is a typeKind variable.
    theKey is an indexed text variable.
    theVal is an indexed text variable.

    To set key value pair for (thisline - an indexed text):
        if character number 1 in thisline is "!" or thisline is empty:
            now theKey is "";
        otherwise if thisline matches the regular expression "(.*)=(.*)":
            now theKey is "[text matching subexpression 1]";
            now theVal is "[text matching subexpression 2]";
            if character number 1 in theVal matches the regular expression "<tTfF>":
                now theType is tBoolean;
            otherwise if character number 1 in theVal matches the regular expression "<['][quotation mark]>":
                now theType is tString;
            otherwise:
                now theType is tNumeric;
        otherwise:
            now theKey is "".