DLL functions returning strings

General discussion about the Phantom Automation Language and related tools.

DLL functions returning strings

Postby CashCow on Fri Jul 20, 2012 1:38 pm

In your documentation of keyword dll (not easy to find by the way) you have specified that a dll imported function can return string as a type.

You failed to mention anywhere how the lifetime of this string is managed.

Your example carefully seems to avoid this issue too.

Fortunately the only DLL function I have had to import so far returns int, although it takes string inputs, that being strcmp() due to your own very weird interpretation of what operator < means between strings, as well as being logically inconsistent regarding ordered sequences. (It is not logically possible for a > b and b > a to both return true.)
CashCow
 
Posts: 5
Joined: Wed Jul 04, 2012 9:07 am

Return to Phantom

Who is online

Users browsing this forum: No registered users and 0 guests

cron