From | David Kantor <[email protected]> |
To | [email protected] |
Subject | Re: st: if command |
Date | Thu, 12 Feb 2004 17:02:47 -0500 |
At 03:26 PM 2/12/2004 -0500, Danielle Ferry wrote:
Can anyone please explain when the if command requires quotes around the expression and when it does not?As far as I know, if you are comparing to a string constant, you need quotes.
For example, I've found the following seemingly quirky behavior:
1) if "`1'"=="aRate" | "`1'"=="bRate" | "`1'"=="pRate" --> requires quotes
2) if `1'==aRate --> does not require quotes
3) if "`1'"=="apRatio" --> requires quotes
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |