From: Kevin Day Date: Thu, 13 Jan 2022 00:14:57 +0000 (-0600) Subject: Update: Provide more details in the documentation on if/else logic. X-Git-Tag: 0.5.8~122 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=17cc8a311d223cbe0d5fb513a449d02087f5391c;p=fll Update: Provide more details in the documentation on if/else logic. With the logic being different from normal conditional logic, I figured that it would be a good idea to add more documentation to further clarify the design. Traditional logic is: A and B or C and D Where order of operations would be: 1) If A and B are TRUE... 2) If C and D are TRUE... 3) If (1) or (2) are TRUE... The logic used by this program would be: A and B or C and D Where order of operations would be: 1) If A and B are TRUE... 2) If (1) or C are TRUE... 3) If (2) and D are TRUE... This is a critical difference in behavior. --- diff --git a/level_3/fake/documents/fakefile.txt b/level_3/fake/documents/fakefile.txt index 7007b1b..4d52c76 100644 --- a/level_3/fake/documents/fakefile.txt +++ b/level_3/fake/documents/fakefile.txt @@ -175,6 +175,31 @@ Fakefile Documentation: The Content represents a set of conditions to perform. + The "if" operation may be used in conjunction with the "and", "or", and the "else" operations. + + The conditional logic is different from normal logic found in most software programs. + There is only one order of operation, a top-down design where the current operation relates to the previous operation. + This is mostly relevant when "if" operation is followed by an "and" or an "or" operation. + + Consider the following\: + if defined parameter xxx + or defined parameter yyy + and defined parameter zzz + print first + else + if defined parameter www + print second + else + print third + + The resulting logic is as follows\: + 1) If "xxx" is defined, then... + 2) If result from (1) is TRUE or if "yyy" is defined, then... + 3) If result from (2) is TRUE and if "zzz" is defined, then... + 4) If result from (3) is FALSE, then... + 5) If result from (4) is TRUE, then... + 6) If result from (5) is FALSE, then... + For all conditions that rely on numbers, only whole numbers are (currently) supported. conditions\: