Questions tagged [algol68]

ALGOL 68 is an imperative computer programming language that was conceived as a successor to the ALGOL 60 programming language.

ALGOL 68 (short for ALGOrithmic Language 1968) is an imperative computer programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously defined syntax and semantics.

Source: Wikipedia

Resources

12 questions
6
votes
3 answers

Python style iterators in C

The "yield" statement in python allows simple iteration from a procedure, and it also means that sequences don't need to be pre-calculated AND stored in a array of "arbitrary" size. Is there a there a similar way of iterating (with yield) from a C…
NevilleDNZ
  • 1,269
  • 12
  • 31
2
votes
2 answers

ALGOL 68 Genie - Insufficient memory

I'm doing this simple "game engine" for cli pixel games creation, a68g game engine. I have seen that in the lib/canvas.a68 file. Those 2 loops are making a error: 7 arr := new 1 a68g: lib/operators.a68: runtime error: 1: insufficient…
Panda Soli
  • 61
  • 6
2
votes
1 answer

Is there a way of linking the NAG library to an Algol68 program on a Ubuntu (Linux) system

I'm re-visiting Algol68 because I think it's historically important. I would like to link one of my programs (written as a student) to the NAG library routine f07abf (linear equation solver). The question is, being a retired academic, do I need to…
1
vote
1 answer

What is the IMPACT of RESIZE and DEALLOCATE on the CPU performance

I have 2 flavors of the same ALGOL code - its a ONE-ONE replacement Which uses - RESIZE (TO RETURN IT LIBARAY POOL) Which uses - DEALLOCATE (TO RETURN IT SYSTEM) The one which the DEALLOCATE Consumes more CPU time and inturn more %processor…
siddharth taunk
  • 309
  • 4
  • 12
1
vote
1 answer

Algol: correct syntax leads to problems in compilation?

Here is a relatively simple code for "Evaluation of pi using the Mid-ordinate Rule on a quadrant of circle with radius 2 units." main.alg BEGIN REAL x, y, sumy, pi; INT n := lowerlimit, p := 1, lowerlimit := 10, upperlimit := 100, interval :=…
Ziezi
  • 6,375
  • 3
  • 39
  • 49
1
vote
3 answers

Semantic differences in Algol and C in casting

Suppose we have the following instructions in Algol 68 and C, respectively: ref int x := 5; and (int*) x = 5;. What are their semantic difference?, it's the same?, because I think that the second one says something like "x will point to a constant"…
Tomás Juárez
  • 1,517
  • 3
  • 21
  • 51
1
vote
1 answer

Static types and conversions

Suppose I have an algol-like language, with static types and the following piece of code: a := b + c * d; where a is a float, b an integer, c a double and d a long. Then, the language will convert d to long to operate with c, and b to double to…
Tomás Juárez
  • 1,517
  • 3
  • 21
  • 51
1
vote
1 answer

using binary semaphore to build counting semaphore

I'm studying semaphores. In the book there's a question without an answer, and I would really like to know how to solve the problem. The question is: This is a counting semaphore written in Algol68: Down mutex: if mutex = 0 then access is blocked …
jiyoung
  • 11
  • 2
1
vote
1 answer

Iterative Factorial in Algol 68

I am suppose the change the code below to do factorial. Anyone can help me with it? This is the Fibonacci. PROC print fibo = (INT n) VOID: BEGIN INT a:= 0, b = 1; FOR i FROM 1 TO n DO print((whole(i,0), "==>", whole(b,0), new…
V_H24
  • 129
  • 2
  • 10
1
vote
4 answers

Naming: BEGIN ~ END vs LIVE ~ EVIL block structured languages

Curly Bracket languages are well known: (wikipedia) Other programming languages can have BEGIN ~ END vs LIVE ~ EVIL block structuring. eg A) BEGIN ~ END, DO ~ END, IF ~ END IF - examples: Ada, Modula, Pascal, PL/I, Ruby etc... B) IF ~ FI, DO…
NevilleDNZ
  • 1,269
  • 12
  • 31
0
votes
1 answer

How to make conversion of Algol 68 Genia language to c++ language

Suggest me on how to change the following code into c++ code: ROOTPROC VarUse PROC VarUse ROOT Cfile; 1 { 2 [ 3 (?NameRef 4 (IF (AND (HAS-TYPE $parent Assignment) (IS-EQUAL $slot ``lhs'')) 5 (THEN (PRINT stdout "Variable %s defined at %s" $token…
eklmp
  • 201
  • 3
  • 9
0
votes
2 answers

In Algol 68 , what readability problems can come from with using reversed closure words for control structures?

like in Algol 68 an if statement ends with fi and a case statement ends with esac , so what are some readability problem other than the reserved words doesn't really make sense in English. Any suggestions would be appreciated
Rami
  • 61
  • 4