Page 1 of 1

Make Import work with String return values

Posted: Mon Feb 01, 2010 3:12 pm
by mback2k
At the moment you have to do the following:

Code: Select all

Import "mylibrary.lib"
  MyMethodWhichReturnsAStringW(Param)
EndImport

Macro MyMethodWhichReturnsAString(Param)
  PeekS(MyMethodWhichReturnsAStringW(Param))
EndMacro
Please just allow us to specify the string as return value:

Code: Select all

Import "mylibrary.lib"
  MyMethodWhichReturnsAStringW.s(Param)
EndImport

Re: Make Import work with String return values

Posted: Thu Jun 10, 2010 11:15 pm
by luis
Yes!

I would like this limitation removed too, considering using PeekS() you can go around it the compiler should be able to do the same for us.

See also: http://www.purebasic.fr/english/viewtop ... 49&start=0

Re: Make Import work with String return values

Posted: Fri Feb 08, 2013 11:58 am
by User_Russian
In my opinion is an artificial limitation and should be allowed to string return.