PDA

View Full Version : Invoking ALIAS from a user module



Johannes
05-03-2011, 12:23
Is it possible to invoke the ALIAS command during initialisation (function LoadLocalSymbols) of a user module?

This would be for my BigInt module: I want to have BigInt as an alias for String, so it will be clearer which variables are used as Big Integers and which are normal strings.

Alias String As BigIntFor now I've added the above line as "optional" code in my manual, just after loading of the module, but it would be nice if the module did this for the user.

Petr Schreiber
05-03-2011, 13:58
Hi Johannes,

SDK currently does support definition of UDT from module:


thinBasic_AddUDT(_
"TYPE TBGL_tVector3D" + $CRLF + _
" x AS DOUBLE" + $CRLF + _
" y AS DOUBLE" + $CRLF + _
" z AS DOUBLE" + $CRLF + _
"END TYPE" _
)
So what you ask should be in theory possible to add, but Eros is the only competent person to confirm this.


Petr

Johannes
06-03-2011, 00:55
Petr,

A PowerBASIC UDT can't have a dynamic string inside it, which is what I need, so that won't work.

Using


Module "BigInt"
Alias String As BigInt
in a thinBasic script works perfectly fine so it's not something very important. But I think it might be helpful for people if the module did that for them.

ErosOlmi
06-03-2011, 09:55
Something to put into the wish list.
Can you be so kind to open a feature request in Support (http://www.thinbasic.com/community/project.php) area?

Thanks
Eros