Re: Date manipulation

From: Howard Brazee (howard_at_brazee.net)
Date: 12/30/03


Date: Tue, 30 Dec 2003 20:36:37 GMT


On 30-Dec-2003, riplin@Azonic.co.nz (Richard) wrote:

> > > > I was under the impression that this gets converted into one call
> > > > though.
> > >
> > > How would the compiler do that ?
> >
> > By having a little bit of smarts. It isn't difficult to see that the same
> > function was called 6 times in one display statement.
>
> And what if it was FUNCTION RANDOM that was being called 6 times ?
> Would the compiler think that it is a good idea to make that just one
> call ?
>
> How about FUNCTION READ_NEXT_RECORD ?

It depends on how the compiler was written and what the standards were.

You're gradually changing the questions from how a compiler could do something
to whether it is a good idea for it to do something similar. The compiler can
be written however the standards say it should be written. I didn't make the
decisions, but I thought I read that this particular function was only called
once per statement. I did say "I was under the impression", which seemed when
I wrote it to be enough waffling.



Relevant Pages

  • Re: Why not add namespace feature into standard C?
    ... features, I can't understand why not add this feature into standard C. ... Because the standards people were more concerned with adding arbitrary ... All the compiler vendors have balked. ...
    (comp.lang.c)
  • Re: SOURCEFORMAT AND COPY LIBRARY
    ... Jimmy? ... Oh that human communication problem! ... version of the compiler, ... I still LIKE YOU :-) - but you are very passionate about the Standards. ...
    (comp.lang.cobol)
  • Re: Testing ham radio software on Sun hardware.
    ... Is that like the way Micro$oft adheres to the W3C standards? ... It sometimes means code built with gcc will not compile on better compilers. ... The other issue is that people often write code that works on Linux, but makes use of Linux specific header files. ... If anyone has some open-source UNIX or Linux code they would like to test on a Sun, using a commercially produced C compiler, let me know. ...
    (uk.radio.amateur)
  • Re: COBOL "non-myth" confirmed - Index and subscripts (MF on Windows)
    ... and will not, by itself, have subscripts catch up to indexes. ... by compiling with optimization off. ... I'll wager 100US it shows the offset from the beginning of the table on my compiler, ... IBM _are_ in the business of writing standards. ...
    (comp.lang.cobol)
  • Re: Moving from 8051 to AVR
    ... particular task -- all of which adhear to the standards. ... incrementing a pointer through an array. ... If the compiler can figure out what is happening, ... An architecture which is C-Friendly will simplify writing the compiler ...
    (comp.arch.embedded)