Macro FOREACH to tag [foreach]
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Re: Macro FOREACH to tag [foreach]
Thanks for the info!
What Ravanal said is correct, I was evaluating the optimistic case and it did not occur to me to check if it was ever negative, when I was doing tests. I was desperate with the $ issue because nothing worked for me, until @gnombat told me that the problem was in [unstore_unit]
What Ravanal said is correct, I was evaluating the optimistic case and it did not occur to me to check if it was ever negative, when I was doing tests. I was desperate with the $ issue because nothing worked for me, until @gnombat told me that the problem was in [unstore_unit]
No, the array variable isCeltic_Minstrel wrote: ↑December 1st, 2022, 2:21 am (By the way, since it's a plural name, is that an array variable? If that's the case you should really writepatients[0].whatever
instead ofpatients.whatever
. The two are equivalent, but the first form makes it clear that you know it's an array.)
patient_units
. patients
is the variable for every element of the array variable that uses [foreach] on each iteration.- Celtic_Minstrel
- Developer
- Posts: 2216
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Macro FOREACH to tag [foreach]
I'd recommend calling it
patient
then. Using a plural name for a singular variable is just going to confuse people.