Page 1 of 1

MultiLib Compile Mode

Posted: Mon Jul 16, 2012 9:16 pm
by Droopy
Hello everybody,

i don't know how to return value as unicode when necessary

Re: MultiLib Compile Mode

Posted: Mon Jul 16, 2012 11:03 pm
by ABBKlaus
Do you mean a string value ?

Code: Select all

String.s
Or

Code: Select all

String$
but its not possible to return unicode-strings when in ascii mode. For that i prefer some memory allocation in combination with pokes() and or peeks() where necessary.

BR Klaus

Re: MultiLib Compile Mode

Posted: Tue Jul 17, 2012 10:43 am
by Droopy
Yes i talk about returning string value.
I want to return ascii or unicode string according to compiler options.

Re: MultiLib Compile Mode

Posted: Tue Jul 17, 2012 11:43 am
by lexvictory
a function like this

Code: Select all

ProcedureDLL.s blah()
    ProcedureReturn "something"
EndProcedure
Will work as expected when multilib mode is used.

It compiles your code in all combinations of compiler options and combines it like PBCompiler expects.

If you are looking to return some other format of string, you can use CompilerIf statements based on the #PB_Compiler_Unicode constant.

Re: MultiLib Compile Mode

Posted: Tue Jul 17, 2012 9:14 pm
by Droopy
Thanks a lot lexvictory,