Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #9163
| From | JennyB <jennybrien@googlemail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: CASE comparison values |
| Date | 2012-01-23 09:11 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <32096725.1413.1327338699800.JavaMail.geo-discussion-forums@vbhn11> (permalink) |
| References | <dedb18b4-3a6e-4012-b0bd-ff017e5bdd1e@a8g2000pbi.googlegroups.com> |
Literals and constants are known at compile time, the results of expressions are not. If you avoid the latter then a CASE statement can be implemented behind the scenes as a jump table, otherwise it has to be equivalent to a nested IF ... ELSE, where each alternative has to be tested in turn until a match is found. In practice, x2 would almost always be known at compile time. I can't think of offhand of a useful CASE where it is not.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
CASE comparison values Percy <percival.andrews@gmail.com> - 2012-01-23 05:32 -0800
Re: CASE comparison values Brad <hwfwguy@gmail.com> - 2012-01-23 07:57 -0800
Re: CASE comparison values Aleksej Saushev <asau@inbox.ru> - 2012-01-23 22:23 +0400
Re: CASE comparison values JennyB <jennybrien@googlemail.com> - 2012-01-23 09:11 -0800
Re: CASE comparison values stephenXXX@mpeforth.com (Stephen Pelc) - 2012-01-23 18:38 +0000
Re: CASE comparison values alberto pasquale <alberto@hal-pc.org> - 2012-01-23 11:42 -0800
Re: CASE comparison values Percy <percival.andrews@gmail.com> - 2012-01-23 14:58 -0800
Re: CASE comparison values "Elizabeth D. Rather" <erather@forth.com> - 2012-01-23 13:41 -1000
Re: CASE comparison values Brad <hwfwguy@gmail.com> - 2012-01-23 19:20 -0800
Re: CASE comparison values "Peter Knaggs" <pjk@bcs.org.uk> - 2012-01-24 10:03 +0000
csiph-web