Laserfiche WebLink
<br />, , PU G 1 78 <br /> <br />Opera lion Policies in RSS <br /> <br />POLICY sumsto TO_DETERMINE sum_storage FOR ResDown <br />BEGIN <br />sum_storage = ResUp.Beginning_storage <br />+ ResDown.Beginning_storage <br />END <br /> <br />A second poficy statement would use this new variable 'sum_storage" to define <br />the release from 'ResOown": <br /> <br />POLICY D release TO DETERMINE Outflow FOR ResDown <br />BEGIN <br />Outflow = 0.3* sum_storage <br />END <br /> <br />These last two policy statements named 'sumsto" and 'O_release" are equiva- <br />lent to the policy statement named "O_outflow" above. <br /> <br />The "O_release" policy statement above could also be written as a conditional <br />policy statement. The condition checks on the existence of a policy statement <br />defining the variable 'sum_storage". <br /> <br />POLICY resrel TO DETERMINE Outflow FOR ResDown <br />BEGIN <br />IF sum_storage <br />THEN Outflow = 0.3*( sum_storage) <br />END <br /> <br />This example has focused on the distinction between the two types of variables: <br />slot variables and user defined variables, Before leaving this topic and this <br />example, note that the underscore "_~ was used to connect muitiple words into a <br />single variable_ The names of user defined variables are entirely the choice of <br />the user. If, for example 'sum_storage" is objectionable, other options are to use <br />what was common to those working with early versions of programming <br />languages that limited words to only a few characters, say SUMSTO or <br />TOTSTO, or to replace underscoring with a mix of upper case and lower case <br />letters, for example, SumStorage or TotalStorage. <br /> <br />Summary <br /> <br />In summary, the user can define any variable names desired. If a value of a slot <br />is to be assigned to a variable, that slot reference must be the name of the slot <br />preceeded by the object name. A period (.) separates the object name from the <br />slot name, Variables to be determined may not contain any periods or spaces. <br />Periods are reserved for separating an object name from the data slot variable <br />name. User-detined variables contained in the headers of policy statements <br />may be used in the body of other policy statements. <br /> <br />Operators <br /> <br />Policy statements define the variable identified after the 'TO_OETERMINE" <br />keyword in the header, Each definition contains an equals (=) sign separating <br />the variable whose value is to be determined on the left from some expression <br />onthe right. Any combination of the +, -,', I and exponentiation" operators <br />may be used in an expression, If an expression includes division, it is often wise <br /> <br />Operation Policies in RSS <br /> <br />23 <br />