1. Redefining Builtins?
How do I redefine a built-In function, yet call it from the new one?
Thanks,
Alex
2. Re: Redefining Builtins?
Alex Chamberlain wrote:
>
> How do I redefine a built-In function, yet call it from the new one?
>
> Thanks,
> Alex
Just like this dude:
without warning
procedure print_(integer io, atom num)
print(io, num)
end procedure
procedure print(integer io, sequence num)
puts(io, num)
end procedure
print(1, "Hello World\n")
print_(1, 1234567890)
machine_proc(26, 0) -- wait_key
Make sure you wrap the original routine before redefining it.
Regards,
Vincent
4. Re: Redefining Builtins?
Vincent wrote:
>
> Alex Chamberlain wrote:
> >
> > How do I redefine a built-In function, yet call it from the new one?
> >
> > Thanks,
> > Alex
>
> Just like this dude:
> }}}
<eucode>
> without warning
>
> procedure print_(integer io, atom num)
> print(io, num)
> end procedure
>
> procedure print(integer io, sequence num)
> puts(io, num)
> end procedure
>
> print(1, "Hello World\n")
> print_(1, 1234567890)
>
> machine_proc(26, 0) -- wait_key
> </eucode>
{{{
> Make sure you wrap the original routine before redefining it.
>
Or perhaps you're asking for this...
without warning
procedure print(integer io, sequence num)
puts(io, num)
end procedure
procedure foo()
print(1, "Hello World\n")
end procedure
foo()
machine_proc(26, 0) -- wait_key
I'm not sure exactly...
Regards,
Vincent