HELP VED_FIXRULE                                Aaron Sloman, April 1996

For Poprulebase version 4, a new notation for defining complete rulesets
was introduced, making the old "define :rule" syntax redundant. This
help file describes a VED utility to simplify the conversion.
Unfortunately it is recommended that you do this a rule at a time
because you may have code between rules that has to be moved to a
location preceding the ruleset header.

    ENTER fixrule
        Converts the rule to the new format
    ENTER fixrule f
        Converts the current rule to be first rule in a ruleset,
        preceded by a ruleset header.

        It assumes that the rule is defined in the format

            define :rule <name> in <rulesetname>

        and it uses this to extract the name of the ruleset.

    ENTER fixrule l

        Treats the current rule as the last rule in the ruleset, leaving
        "enddefine;" at the end of the rule.

    ENTER fixrule fl
        Treats the current rule as the first and last rule in the
        ruleset, i.e. the only one.

Note: if there is no ruleset name, then ved_fixrule assumes
that "prb_rules" is the ruleset name, as a reminder that that is the
default.

Using "define :ruleset .... enddefine" you no longer need to declare
ruleset identifiers and initialise them to [], as it is now done
automatically.

The following global variables control the behaviour of ved_fixrule. If
you wish to change them, do

    uses ved_fixrule

then assign to the variables before you first use the procedure.

global vars

    ;;; use "RULE" if true, "rule" if false, as rule header. Both are
    ;;; accepted by define :ruleset. I think "RULE" stands out better.
    use_RULE = true,

    ;;; replace ";" with "==>" between conditions and actions if true.
    use_==> = true,

    ;;; if true, leave ruleset name in comment after each rule name
    leave_ruleset = true,

    ;



--- $poplocal/local/prb/help/ved_fixrule
--- Copyright University of Birmingham 1996. All rights reserved. ------
