Vào 02:04:36 UTC+7 Chủ Nhật, ngày 08 tháng 3 năm 2020, miasap đã viết:
On 2020-03-06 08:52, Hưng Gia wrote:
It seemed OBNC doesn't understand the "..." like GNU Modula-2.
https://www.nongnu.org/gm2/interface_to_c.html
How could I use libc's function like printf, which take a variable number of arguments?
OBNC implements only the features in the language report, which means
that the number of parameters for a given procedure is fixed.
-- Karl
Many libraries make use of variable argument list. If I want to create a binding for Oberon to work with ONBC, how could I implement it? Or I have used Oberon wrong all the time, that Oberon was designed to be a standalone language and everything should
be done on Oberon alone and interfacing to other libraries not needed? I think Oberon is a general purpose language and want to do GUI in Oberon, so I plan to create a binding for GTK+. I don't know if I could accomplish this job but the first show
stopper is va_list. Another problem is I have to doubled the work. First to write an Oberon module then having to edit the generated C source which is the the actual binding. So I asked if we could make it easier to use a header like solution, .def file
as GNU Modula-2 does, to simplify the process? So I only have to write the .def file once then just use it.
It seemed my proposal would not accepted because you followed a guide line so you can't introduce new extensions and I was wrong to think Oberon is a general purpose language, it should be considered as a special purpose language.
-- Hưng
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)