11-06-2015, 10:31 PM
I have a choose list of program options:
CHOOSE(CHS,"",{a list of menu choices})
for which I am implementing a HELP function.
Some of the menu options are so simple they need no help.
Or, at least, no help has yet been written.
I don't want to write
CHOOSE(CHS,"help",{just the ones with help written})
And keep needing to change that additional list.
Conceptually, what I am thinking of is something like
CHOOSE(CHS,"help",
{a list of menu choices: the same as for commands} AND { {True},{True},{Null},{True})
Where the null entry has the effect of eliminating the corresponding command text from the CHOOSE (but ideally leaving a blank entry, So that subsequent True entries are in the expected place).
I am wondering what the easiest way of doing this would be.
The obvious solution would involve a copied list, and a for loop either copying an item or not...
But I suspect some experts can suggest an easier syntax to achieve this.
Is there any simple syntax similar to
{"text1", "text2"} AND {false,true}
that would return
{""," text2"} ?
CHOOSE(CHS,"",{a list of menu choices})
for which I am implementing a HELP function.
Some of the menu options are so simple they need no help.
Or, at least, no help has yet been written.
I don't want to write
CHOOSE(CHS,"help",{just the ones with help written})
And keep needing to change that additional list.
Conceptually, what I am thinking of is something like
CHOOSE(CHS,"help",
{a list of menu choices: the same as for commands} AND { {True},{True},{Null},{True})
Where the null entry has the effect of eliminating the corresponding command text from the CHOOSE (but ideally leaving a blank entry, So that subsequent True entries are in the expected place).
I am wondering what the easiest way of doing this would be.
The obvious solution would involve a copied list, and a for loop either copying an item or not...
But I suspect some experts can suggest an easier syntax to achieve this.
Is there any simple syntax similar to
{"text1", "text2"} AND {false,true}
that would return
{""," text2"} ?