LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Dale Long <dalel@loftuscomp.com.au>
  To  : Glen Turner <glen.turner@aarnet.edu.au>
  Date: Thu, 29 Nov 2001 11:41:17 +1030 (CST)

Re: strange C code

On Thu, 29 Nov 2001, Glen Turner wrote:
> > I think the thing of interest here is supposed to be the inclusion of
> > the "default" case at the first case, whereas it is traditionally listed
> > last.  C seems to do the logical thing here and do case 1, but other
> > languages (such as Ada) may have different results for equivalent code.
> 
> It's the logical thing if you are used to compiled languages.
> People used to interpreted languages would expect the "default"
> option to be executed.

Given an interpreted language, that would depend on how some languages
define a 'chunk' or block of code and what type of look-ahead they do.

Dale.

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page