doswitch
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| doswitch [2018/03/04 18:35] – created wolfgangriedmann | doswitch [2018/08/20 04:06] (current) – wolfgangriedmann | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| Please look at this sample code: | Please look at this sample code: | ||
| - | < | + | < |
| local cResult as string | local cResult as string | ||
| Line 22: | Line 22: | ||
| This statement is very efficient and fast, but much less flexible as the '' | This statement is very efficient and fast, but much less flexible as the '' | ||
| For example, the compiler will give an error in this case: | For example, the compiler will give an error in this case: | ||
| - | < | + | < |
| .... | .... | ||
| case " | case " | ||
| .... | .... | ||
| - | case " | + | case " |
| And also this will not work (compiler error also): | And also this will not work (compiler error also): | ||
| - | < | + | < |
| because the value need to be a constant and not a variable. | because the value need to be a constant and not a variable. | ||
| If you need more than one value, you can write as well: | If you need more than one value, you can write as well: | ||
| - | do switch nValue | + | <code visualfoxpro> |
| case 1 | case 1 | ||
| case 2 | case 2 | ||
doswitch.1520188521.txt.gz · Last modified: 2018/03/04 18:35 by wolfgangriedmann