Re: [ooc-compiler] wrapper to SYSTEM.VAL
Brought to you by:
mva
|
From: Stewart G. <sgr...@us...> - 2010-10-04 02:23:05
|
Hi Norayr, On 2/10/10 5:42 AM, Norayr Chilingaryan wrote: [...] > So, is it possible in principle to create a VAL wrapper, by taking in > consideration that it is implemented on the compiler level actually. > Usually, modules in Ulm's library import SYSTEM by using SYS alias, like > this: > IMPORT SYS:=SYSTEM > which I replace by SYS := ULMSYSTEM > It is of course possible to change every occurence of SYS.VAL by the > SYSTEM.VAL, but I consider it as a dirty option. > It is also possible to wrap VAL by using C implementation, what I also > would like to avoid for now. You can't wrap the SYSTEM.VAL function because it is implemented in the compiler. There's no way to pass type parameters to Oberon-2 procedures; although OOC supports generics, this only works for Object types. I think the solution you suggested is probably the best option, though as you say it is not ideal. Cheers, Stewart |