[Seed7-users] Generics
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: Anton L. <ant...@ur...> - 2019-05-20 01:17:54
|
Hi, I am trying to understand how generics in Seed7 work and after reading the FAQ section under "Are there generics/templates" my understanding is that a generic function should be able to accept other functions as generic parameters, however, when I compile the code below I am getting a segmentation fault, so what am I missing in my understanding? $ include "seed7_05.s7i"; const proc : GENERIC (in proc : procedure) is func begin const proc : run is func begin procedure; end func; end func; GENERIC (writeln ("Hello from Seed7!")); const proc : main is func begin run; end func; SEED7 COMPILER Version 3.0 Copyright (c) 1990-2019 Thomas Mertes Source: generic2.sd7 Compiling the program ... Segmentation fault Best, Anton |