A "similar" syntax is provided by rexx, originally an IBM mainframe
scripting language. It is available in several commercial versions,
but there is also a very good free version known as regina
maintained, incidentally, by another Australian:
http://regina-rexx.sourceforge.net/
Functions like sin are not included, but of course can (and have) been
written. Your example in rexx:
x = 0
do i=x+1 to 100
if (i < 50) then Do
say "i is less than 50"
End
else say "i is greater than or equal to 50"
x = x + sin(i)
say x
end
Cheers, Wes
On Tue, 10 Feb 2004, Stuart Midgley wrote:
> Hi all
>
> A few people on this list may be using my function parser (either the
> free version or the version covered by a "loose" agreement)
>
> http://smidgley.customer.netspace.net.au/fortran/
>
> Well, out of pure interest and to keep me off the streets at night, I
> started to write a scripting language entirely in Fortran 90/95. It is
> currently in an infantile state, but it works - well sort of :) I have
> do loops, if-then-else-endif statements, assignment, print etc... all
> as an interpreted language. It has a "shell" environment (where you
> can enter commands interactively) or an API-like interface (where you
> provide the interpreter with an open file handle)/
>
> eg.
>
> x = 0
> do i=x+1, 100
> if (i < 50) then
> print "i is less than 50"
> else
> print "i is greater than or equal to 50"
> endif
>
> x = x + sin(i)
> print x
> end do
>
> Is anyone else interested in such a scripting language? If so, I am
> after a few people to comment on my interpreter (whether my syntax
> makes sense etc), test it and suggest functionality.
>
> Email me if you want to play with this monster.
>
> Stu.
>
>
> --
> <--------------------------------------------------------------------->
> Dr Stuart Midgley | [log in to unmask]
> Supercomputer Facility | [log in to unmask]
> Leonard Huxley Building 56 | +61 (0)2 6125 5988 Work
> Australian National University | +61 (0)2 6125 8199 Fax
> CANBERRA ACT 0200 | +61 (0)4 1125 2488 Mob
>
--
Dr. W. J. Metzger Experimental High Energy Physics Group
tel. +31-24-3653127 Faculty of Natural Sciences
+31-24-3652099 (secr.) University of Nijmegen (**)
fax. +31-24-3652191 Toernooiveld 1
6525 ED Nijmegen, The Netherlands
e-mail: [log in to unmask] or [log in to unmask]
http://home.cern.ch/metzger/ or http://www.hef.kun.nl/~wes
(**) After 1 Sept. 2004, Radboud University Nijmegen
(Clearly superior to the Wichita Academy of Learning Kansas)
|