🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.simula
1 messages
1 total messages Started by Morten Gulbrandsen Sun, 09 Mar 2003 19:11
SIMULA STATEMENTS
#107
Author: Morten Gulbrandsen
Date: Sun, 09 Mar 2003 19:11
45 lines
1719 bytes
hello programmers,
here is a piece of code from  
http://www.cis.um.edu.mt/~jskl/talk.html#Statements



cim  -V
cim-3.36-i686-pc-linux-gnu


cat  general_example.sim
Begin
   Integer i;
   For i:= 1, 13, 20 step 10 until 40, 70, i+1 
      while i lt 76, 100 step 50 until 250, 1000, 1500 
          do  
          OutInt(i,5);
End;




cim  general_example.sim 
Compiling general_example.sim:
gcc -g -O2 -c general_example.c
gcc -g -O2 -o general_example general_example.o -L/usr/local/lib -lcim
./general_example 
    1   13   20   30   40   70   71   72   73   74   75  100  150  200
 250 1000
 1500


===

I can compile it,  run it and I believe it is a nested for and while
loop.

can someone please comment it and perhaps explain how this  looks in
object pascal or C++  ?

where can I get more general tutorial information about simula ?

Yours Sincerely

Morten Gulbrandsen
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads