Hello Aubrey,
as far as I understand the first step of your approach is to use a representation of complex numbers similar to the one implemented in Robert's Lib. It works, of course, but as Robert mentioned it has some efficiency problems and is not particularly convenient if you have complicated expressions, which should all be rewritten using Add, Multiply, ... procedures instead of +,*,...
As for your suggestion to use Coco, it could be very interesting, but I'm not sure I understand what you exactly mean. Can you please clarify, what should be an input and an output of this automatic source->source translation and how should it be integrated with BlackBox?
Georgy
On Sat, Jul 4, 2009 at 9:26 PM, <Aubrey.McIntosh{([at]})nowhere.xy
So:
I produced a real program using (only) a pointer type for function returns.
I defined (as procedures) any operation that I desired.
I found I could change
a := b+c;
into
a := Add (b,c);
using (in Oberon V4) RegExp. Today, I would probably use Coco and the
language grammar to make some automatic source --> source translator.
I am able to read the source code without particular trouble.
What I don't see is why this approach is not good with complex. What
won't work?
On Sat, Jul 4, 2009 at 1:42 PM, Georgy Jikia<georgy.jikia{([at]})nowhere.xy
> Let me try to ask a slightly different question. Suppose I do need COMPLEX
> data types in BlackBox and I am ready to get my hands dirty and implement
> COMPLEX as a new basic type. So a new COMPLEX basic type should be defined,
> mathematical operations should be implemented and the new type should be
> available in modules importing COMPLEX. Without procedures
> returning structured types and without operator overloading the
> implementation could only be done by extending system modules of the
> BlackBox. Although implementation using standard BlackBox modules is not
> possible, it seems COMPLEX could be implemented similar to SYSTEM or COM
> (pseudo-) modules, which do not exist as usual BlackBox SYSTEM.odc or
> COM.odc, but are hard coded in Dev subsystem. The problem is that the
> documentation for BlackBox modules intended for internal use only is absent.
> So, can somebody who knows inner workings of BlackBox make a comment on how
> such an extension of the core of BlackBox could be done? Can such an
> extension be localized or would it have to be spread all over the system
> modules? I guess the task is much more difficult, than writing overloaded
> operations in active oberon or C++, but it is interesting to know how much
> more difficult?
>
> Georgy
>
>
> ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy
--
--
Aubrey McIntosh, Ph.D.
1502 Devon Circle
Austin TX 78723-1814
http://home.grandecom.net/~amcintosh/aubrey/Search/
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Sun Jul 05 2009 - 11:57:45 UTC