henrik
I Have tried to conditionally adjust a parameter depending on its value using IF, but I always get an error, probably the syntax is wrong but it would be great if someone could point me in the right direction. Please see my attempt below:
I am trying to adjust the "total" amount conditionally if the value of total is >1.
prm total = ((wp_phase1) + (wp_phase2)); : 0
If(total>1, prm total_adjusted = (total * 0.8);:0, prm total_adjusted = total ;:0);
johnsoevans
I haven't looked at your specific example in detail. I find the best way to learn/remember topas syntax is to look in "topas.inc" which contains 2500 lines of topas macros. There's normally a similar example, and it's often easier to find things than in "tech ref". It's in the main topas directory or via Topas_Durham_Menus/Help/Alans macros if you use jEdit. Just be careful not to change the file when you read it (perhaps make yourself a backup copy).
There are 21 "If(" statements in there.
jEdit tip: highlight the text you're interested in the hit alt-fullstop.
henrik
Thank you for pointing me in the right direction. This syntax worked:
prm total = ((wp_phase1) + (wp_phase2)); :0
prm total_adjusted = If(total>1, total * 0.8, total); :0