clarification of 'IF' - solved
Re: clarification of 'IF'
The best you can do is edit the post and change it to say something like, "deleted."
Re: clarification of 'IF'
Documentation updated:
KeyPgIfthen → fxm [added example]
(not to complicate, the 2 examples work whatever the dialect used)
KeyPgIfthen → fxm [added example]
(not to complicate, the 2 examples work whatever the dialect used)
Re: clarification of 'IF'
Thanks caseih.caseih wrote:The best you can do is edit the post and change it to say something like, "deleted."
Done.
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: clarification of 'IF'
Thank you, fxm
david
david
Re: clarification of 'IF'
In yet another previous topic (viewtopic.php?f=9&t=24977), Tourist Trap had proposed a more generic definition of syntax at the top of the documentation page:
(in addition, I didn't check it !)
but I didn't used it for the documentation page because the 3rd syntax is a little too complex to dissect for a user, and moreover the use of elseif in a single-line syntax is not supported by the 'qb' dialect.Tourist Trap wrote: ...
I think I've found the trick then:Who has said that the most frequent keywords are the simplest ;-)If expression Then statement [ : statement(s)]
or
If expression Then [statement(s)] Else [statement(s)] [End If]
or
If expression Then [ : [ [statement(s)] [ {[ ElseIf expression Then : ]} Else [statement(s)] :]] ] End If
or
multiline
(in addition, I didn't check it !)
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: clarification of 'IF' - solved
For most purposes, I think simpler is better, and examples can display what the imperfect text cannot. This isn't an ISO language, after all.
I suggest you not change anything else on that page. I wouldn't have started this thread if I knew a fight would start over a single word.
Many of the keywords could have pages and pages of explanation. Valuable for some, but a waste of time for most. Every language has 'trick syntax' that seem to break the rules. The 'trick' is usually the poor published explanation, not the actual use rules. Sometimes, there is no simple way to explain some usage, and verbose explanations make it seem too complex. Simple is better. Apologize and explain later.
Someone could collect weird, unusual, seemingly rule-breaking code examples on a tutorial page and explain how they work and why they work.
Away from the official docs, but available. At least the hunt for some of these difficult to define, or difficult to list items would have a home.
I remember the time I spent trying to find the reference on the bitfield assignment (in TYPE). It was very frustrating.
That is still true. I just looked: there is no reference to the TYPE page from any 'bit' related page or reference, anywhere.
Not in Assignment operators or Indexing operators, Bitwise operators, UDT, etc. Nowhere. A 'Using Bits' topic page would be best, maybe.
david
I suggest you not change anything else on that page. I wouldn't have started this thread if I knew a fight would start over a single word.
Many of the keywords could have pages and pages of explanation. Valuable for some, but a waste of time for most. Every language has 'trick syntax' that seem to break the rules. The 'trick' is usually the poor published explanation, not the actual use rules. Sometimes, there is no simple way to explain some usage, and verbose explanations make it seem too complex. Simple is better. Apologize and explain later.
Someone could collect weird, unusual, seemingly rule-breaking code examples on a tutorial page and explain how they work and why they work.
Away from the official docs, but available. At least the hunt for some of these difficult to define, or difficult to list items would have a home.
I remember the time I spent trying to find the reference on the bitfield assignment (in TYPE). It was very frustrating.
That is still true. I just looked: there is no reference to the TYPE page from any 'bit' related page or reference, anywhere.
Not in Assignment operators or Indexing operators, Bitwise operators, UDT, etc. Nowhere. A 'Using Bits' topic page would be best, maybe.
david