<************************************** * * * test string constants * * * **************************************> <$define susi:string> <$let susi=susi><(susi)> <$let susi="susi-double"><(susi)> <$let susi='susi-single'><(susi)> <$let susi=("susi-double-in-brackets")><(susi)> <$let susi=(susi)><(susi)> <************************************** * * * test string operators * * * **************************************> <************************************** * checkIn * **************************************> <$macro checkIn little:string/r big:string/r> <$if cond=(little IN big)>IN<$else>-NOT IN <************************************** * checkConcat * **************************************> <$macro CheckConcat v1:string/r v2:string/r vu:string/r> <$define vc:string=(v1+v2)><$stripws type=prev> [<(v1)>] + [<(v2)>] = [<(vc)>] = [<(vu)>] <$if cond=(vu<>vc)><$stripws type=prev> ERROR! <$let susi="susi"> <$let susi=(susi+" and sepp")><(susi)> <$let susi=("hugo, "+susi)><(susi)> <************************************** * * * test boolean operators * * * **************************************> <************************************** * printBool: * * insert boolean value as "0" or "1" * **************************************> <$macro printBool v:bool><$if cond=(v)>1<$else>0 <************************************** * check boolean function, 2 operands * * * * inputs: * * v1, v2...boolean operands * * vc.......result (computed) * * vu.......result (user suggestion)* **************************************> <$macro checkBool2 v1:bool v2:bool op:string vu:bool> <$define vc:bool> <("<$let vc=(v1 "+op+" v2)>")><$stripws type=prev> *== <$if cond=(vc xor vu)><$stripws type=prev> ERROR! CheckBool2: error handling <************************************** * check AND,OR,XOR with 2 operands * **************************************> Check AND (2): Check OR (2): Check XOR (2): <************************************** * * * test numeric operators * * * **************************************> <************************************** * check numeric function, 2 operands * * * * inputs: * * v1, v2...numeric operands * * vc.......result (computed) * * vu.......result (user suggestion)* **************************************> <$macro checkNumeric2 v1:num/r v2:num/r op:string vu:num/r> <$define vc:num> <("<$let vc=(v1 "+op+" v2)>")><$stripws type=prev> <$if cond=(op="&")><$let op="&"> <(v1)> <(op)> <(v2)> = <(vc)> = <(vu)> <$if cond=(vc<>vu)><$stripws type=prev> ERROR! CheckNumeric2: error handling <$message text="checking error handling"> <************************************** * check numeric with 2 operands * **************************************> Check "+" (2):