Hi
I can think of at least one that might
do something funny in Forth. Example:
: DoSomething
20 0 DO
R> 1+ >R
I .
LOOP ;
Still, execution order is well defined. This operation
will do different things based on the Forth it
was used with but the order of doing things is
not under question.
It might even crash the computer. This kind of thing
is usually specified to not be covered by the specifications
in most Forth standards. Usually, the release does
specify the behavior in any case.
Dwight
From: "Dave Dunfield" <dave04a at
dunfield.com>
I think
the OP's point has been completely missed (that a valid program is a
inherently very definitive and detailed specification).
What I was commenting on was this statement by John Hogerhuis:
I think the programming language is the most
succinct, clear, and unambiguous specification language imaginable.
Almost always each construct has one and only one interpretation.
Which really depends upon the language.
I agree with his statement - however in a public forum, one needs to add
some fire resistant padding like "programming language when properly used"
or "a valid program". C like many languages (including FORTH :-) has loopholes
where one can create program which invoke undefined behaviour, however these
constructs generally exist in the real world only at the hand of someone very
new to the language, or intentially contriving an "example".
Generally speaking, a programming language is more succinct, clear and
unambiguous than many other forms of abstraction - the fact that it is possible
to abuse it to other ends in specific cases does not invalidate that claim.
-spc (And C leaves some stuff underspecified
like this to help compiler
writers wring performance out of compiled code ... )
and for historical reasons.
Regards,
Dave
--
dave04a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools:
www.dunfield.com
com Collector of vintage computing equipment:
http://www.parse.com/~ddunfield/museum/index.html