From: glen herrmannsfeldt on 18 Oct 2006 13:40 In comp.lang.fortran wclodius(a)lanl.gov wrote: > Minor comment. Fortran as a language is one of the few with NO reserved > words/identifiers. You can not only define your own SIN function, you > can also define your own FUNCTION, IF, END, CONTINUE, ... functions, > variables, or subroutines. Not quite as good as PostScript, which even lets you redefine the def operator (for defining new operators), or TeX which allows you to change which characters are letters, and other character category codes. Fortran is the only language I know of with no reserved words and where blank are not significant. DO1I=1,10 1 DO 1 I = I WRITE(6,*) DO 1I -- glen
From: Peter Flass on 18 Oct 2006 18:04 Richard Maine wrote: > Rostyslaw J. Lewyckyj <urjlew(a)bellsouth.net> wrote: > > >>Well yes and no. The intrinsics are not really a part >>of the language, though almost. I don't believe any such >>functions are mandated for the language in the standard. > > > I couldn't quirte follow whether you were talking about Fortran or PL/I, > both having been mentioned in prior paragraphs. I don't know enough PL/I > to comment, so I won't tr. But in Fortran, the standard intrinsic > functions most definitely are part of the language. They are specified > in the standard, are required of all compilers, and are in general just > as much a part of the language as the syntax is. So I wasn't the only one confused. "Builtin functions" in PL/I are part of the standard, though most implementations extend the standard set.
From: Charlie Gibbs on 18 Oct 2006 21:16 In article <eh5fks$4gv$3(a)mailhub227.itcs.purdue.edu>, dseaman(a)no.such.host (Dave Seaman) writes: > On 18 Oct 2006 07:38:30 -0700, wclodius(a)lanl.gov wrote: > >> Minor comment. Fortran as a language is one of the few with NO >> reserved words/identifiers. You can not only define your own >> SIN function, you can also define your own FUNCTION, IF, END, >> CONTINUE, ... functions, variables, or subroutines. Fortran uses >> punctuation to identify contexts where keywords are required >> (resulting in the potential need for a second pass in lexing), >> and the explicit identification of user defined semantics for >> a name will use user definition in locations where keywords are >> not required. >><snip> > > ... which reminds me of the following ancient example: > > integer go to,do 100 if,return > real read(4) > logical go to if > real logical(30) > data read/4h(1x,,3hi5,,4hf8.1,1h)/ > data go to,do 100 if,if 100 do/2,1,30/ > assign 100 to if go to > do 100 if=do 100 if,if 100 do > return=if > logical(if)=return > go to if=if-go to*(if/go to).eq.do 100 if > if(go to if) go to if go to > call call(logical,return) > 100 continue > print read, (if,logical(if),if=do 100 if,if 100 do) > stop > end > subroutine call( integer,real ) > integer real > real integer(real) > common(if)=if*if > integer(real)=common(real) > return > end Omigod. It's the ancestor of the IOCCC! But maybe we should call it the IOFFF, for, uhh... International Obfuscated Fortran Fabrication Fandango. -- /~\ cgibbs(a)kltpzyxm.invalid (Charlie Gibbs) \ / I'm really at ac.dekanfrus if you read it the right way. X Top-posted messages will probably be ignored. See RFC1855. / \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
From: Sjouke Burry on 18 Oct 2006 20:56 Charlie Gibbs wrote: > In article <eh5fks$4gv$3(a)mailhub227.itcs.purdue.edu>, > dseaman(a)no.such.host (Dave Seaman) writes: > > >>On 18 Oct 2006 07:38:30 -0700, wclodius(a)lanl.gov wrote: >> >> >>>Minor comment. Fortran as a language is one of the few with NO >>>reserved words/identifiers. You can not only define your own >>>SIN function, you can also define your own FUNCTION, IF, END, >>>CONTINUE, ... functions, variables, or subroutines. Fortran uses >>>punctuation to identify contexts where keywords are required >>>(resulting in the potential need for a second pass in lexing), >>>and the explicit identification of user defined semantics for >>>a name will use user definition in locations where keywords are >>>not required. >>><snip> >> >>... which reminds me of the following ancient example: >> >> integer go to,do 100 if,return >> real read(4) >> logical go to if >> real logical(30) >> data read/4h(1x,,3hi5,,4hf8.1,1h)/ >> data go to,do 100 if,if 100 do/2,1,30/ >> assign 100 to if go to >> do 100 if=do 100 if,if 100 do >> return=if >> logical(if)=return >> go to if=if-go to*(if/go to).eq.do 100 if >> if(go to if) go to if go to >> call call(logical,return) >> 100 continue >> print read, (if,logical(if),if=do 100 if,if 100 do) >> stop >> end >> subroutine call( integer,real ) >> integer real >> real integer(real) >> common(if)=if*if >> integer(real)=common(real) >> return >> end > > > Omigod. It's the ancestor of the IOCCC! But maybe we should call it > the IOFFF, for, uhh... International Obfuscated Fortran Fabrication > Fandango. > Why dont we take programmers who do that outside, put them in front of a wall, and...........
From: David Wade on 19 Oct 2006 05:45
"Sjouke Burry" <burrynulnulfour(a)ppllaanneett.nnlll> wrote in message news:4536cd41$0$2014$ba620dc5(a)text.nova.planet.nl... > Charlie Gibbs wrote: > > In article <eh5fks$4gv$3(a)mailhub227.itcs.purdue.edu>, > > dseaman(a)no.such.host (Dave Seaman) writes: > > > > > >>On 18 Oct 2006 07:38:30 -0700, wclodius(a)lanl.gov wrote: > >> > >> > >>>Minor comment. Fortran as a language is one of the few with NO > >>>reserved words/identifiers. You can not only define your own > >>>SIN function, you can also define your own FUNCTION, IF, END, > >>>CONTINUE, ... functions, variables, or subroutines. Fortran uses > >>>punctuation to identify contexts where keywords are required > >>>(resulting in the potential need for a second pass in lexing), > >>>and the explicit identification of user defined semantics for > >>>a name will use user definition in locations where keywords are > >>>not required. > >>><snip> > >> > >>... which reminds me of the following ancient example: > >> > >> integer go to,do 100 if,return > >> real read(4) > >> logical go to if > >> real logical(30) > >> data read/4h(1x,,3hi5,,4hf8.1,1h)/ > >> data go to,do 100 if,if 100 do/2,1,30/ > >> assign 100 to if go to > >> do 100 if=do 100 if,if 100 do > >> return=if > >> logical(if)=return > >> go to if=if-go to*(if/go to).eq.do 100 if > >> if(go to if) go to if go to > >> call call(logical,return) > >> 100 continue > >> print read, (if,logical(if),if=do 100 if,if 100 do) > >> stop > >> end > >> subroutine call( integer,real ) > >> integer real > >> real integer(real) > >> common(if)=if*if > >> integer(real)=common(real) > >> return > >> end > > > > > > Omigod. It's the ancestor of the IOCCC! But maybe we should call it > > the IOFFF, for, uhh... International Obfuscated Fortran Fabrication > > Fandango. > > > Why dont we take programmers who do that outside, > put them in front of a wall, and........... Because its really the payroll package that they wrote, and if they stop getting paid, no one else gets paid, and no else can fix their code...? |