- Getting modules to load. Component Builder 1.5

From: Rene A. Krywult <"Rene>
Date: Tue, 20 Mar 2007 22:59:44 +0100

----boundary-LibPST-iamunique-3029913_-_-
Content-type: text/plain

Wayne,

The module name makes it all. So, let's assume, your module is called "Mine". Your code has to look like this:

MODULE BugsMine;
.
.
.
END BugsMine.

This is case sensitive!

if you do this, compiling such a text will place the .ocf and the .osf in the sym and code directory of Subsystem (that's what we call packages) Bugs (which, IIRC, is the subsystem for WinBugs).

You save your module as Bugs\Mod\Mine.odc. (though windows is not case sensitive in filenames, make sure to use the same cases in the filename as in the module, or using some special BB-functionalities will be difficult!)

When there is something in your module that has to be accessible from the outside (variables, commands, functions...), you have to EXPORT them. this is done by placing an asterisk (read and write) or a minus (readonly) after the name of what you want to export.

No module will be loaded, before some of its code is executed. That is: If you do not use a module, it will not be loaded. If you only import it, but the importing module is not loaded, your module will not be loaded.

The RSRC-directory is only for the GUI.

Since I don't know what you're trying to do, I don't know, if you're doing it right ;-).

Hope that helps.
Rene Krywult
Vienna, Austria
-------- Original-Nachricht --------
Datum: Tue, 20 Mar 2007 07:47:36 -0800
Von: HajasW{([at]})nowhere.xy
An: blackbox{([at]})nowhere.xy
Betreff: [BlackBox] - Getting modules to load. Component Builder 1.5

> I am new to Pascal and new to Component Builder. I do have some
> prgramming
> experience.
>
> I am trying to add some mathematical functions to an existing
> package(WinBugs) developed in Component Builder. I do not wish to change
> the GUI of the existing package.
>
> I can follow some examples and develop a new module and successfully
> compile
> it. .ocf and .osf files are created. When I look at the loaded modules I
> don't see the module I have successfully compiled.
>
> I am not able to develop a second module that calls the first module .
> Where the first module is called I get "Undeclared Identifier".
> I'm generally confused about what the first function should be called when
> I
> call it from the second function. I am not sure if the .osf and .ocf are
> going to the right place. And I'm not sure if I'm doing the right things
> in
> the Rsrc directory.
>
> So I'm looking for some guidance for loading modules. And if somebody can
> point me to some good web-references that would be great.
>
> Thanks very much,
>
> Wayne Hajas
> Pacific Biological Station
> 3190 Hammond Bay Road
> Nanaimo, BC
> Canada
> V9T 6N7
> hajasw{([at]})nowhere.xy
> (250)756-7367
>

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy----boundary-LibPST-iamunique-3029913_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFdheW5lLFxwYXINClxwYXINClRoZSBtb2R1bGUg
bmFtZSBtYWtlcyBpdCBhbGwuIFNvLCBsZXQncyBhc3N1bWUsIHlvdXIgbW9kdWxlIGlzIGNhbGxl
ZCAiTWluZSIuIFlvdXIgY29kZSBoYXMgdG8gbG9vayBsaWtlIHRoaXM6XHBhcg0KXHBhcg0KTU9E
VUxFIEJ1Z3NNaW5lO1xwYXINCi5ccGFyDQouXHBhcg0KLlxwYXINCkVORCBCdWdzTWluZS5ccGFy
DQpccGFyDQpUaGlzIGlzIGNhc2Ugc2Vuc2l0aXZlIVxwYXINClxwYXINCmlmIHlvdSBkbyB0aGlz
LCBjb21waWxpbmcgc3VjaCBhIHRleHQgd2lsbCBwbGFjZSB0aGUgLm9jZiBhbmQgdGhlIC5vc2Yg
aW4gdGhlIHN5bSBhbmQgY29kZSBkaX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W9kdWxlcy4gIEFuZCBpZiBzb21lYm9keSBj
YW5ccGFyDQo+IHBvaW50IG1lIHRvIHNvbWUgZ29vZCB3ZWItcmVmZXJlbmNlcyB0aGF0IHdvdWxk
IGJlIGdyZWF0LlxwYXINCj4gIFxwYXINCj4gVGhhbmtzIHZlcnkgbXVjaCxccGFyDQo+ICBccGFy
DQo+IFdheW5lIEhhamFzXHBhcg0KPiBQYWNpZmljIEJpb2xvZ2ljYWwgU3RhdGlvblxwYXINCj4g
MzE5MCBIYW1tb25kIEJheSBSb2FkXHBhcg0KPiBOYW5haW1vLCBCQ1xwYXINCj4gQ2FuYWRhXHBh
cg0KPiBWOVQgNk43XHBhcg0KPiBoYWphc3dAZGZvLW1wby5nYy5jYSA8bWFpbHRvOmhhamFzd0Bk
Zm8tbXBvLmdjLmNhPiBccGFyDQo+ICgyNTApNzU2LTczNjdccGFyDQo+ICBccGFyDQpccGFyDQot
LSBccGFyDQoiRmVlbCBmcmVlIiAtIDEwIEdCIE1haWxib3gsIDEwMCBGcmVlU01TL01vbmF0IC4u
LlxwYXINCkpldHp0IEdNWCBUb3BNYWlsIHRlc3Rlbjogd3d3LmdteC5uZXQvZGUvZ28vbWFpbGZv
b3Rlci90b3BtYWlsLW91dFxwYXINClxwYXINCi0tLSBCbGFja0JveFxwYXINCi0tLSBzZW5kIHN1
YmplY3QgSEVMUCBvciBVTlNVQlNDUklCRSB0byBibGFja2JveEBvYmVyb24uY2h9fQBvbiBzaG91
bGQg
----boundary-LibPST-iamunique-3029913_-_---
Received on Tue Mar 20 2007 - 22:59:44 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:43 UTC