On Mon, 28 Apr 2008 00:42:29 +0200, "Gordon Rahman"
<grahman@[EMAIL PROTECTED]
> wrote:
><news@[EMAIL PROTECTED]
> schreef in bericht
>news:8e9135ca-e95f-4790-93cd-3cb16b9a4eac@[EMAIL PROTECTED]
>
>>One reason why I have made an effort to understand and
>>use Liberty Basic is, perhaps strangely, so I can learn by comparison
>>more about BBC BASIC!
>>
>>Incidentally, to display a message box in BBC BASIC you do:
>>
>>SYS "MessageBox", 0, "Hello world!", 0, 0
>>
<snip>
> Liberty BASIC sample
>
>CallDLL #user32, "MessageBoxA",_
> hWnd As uLong,_
> "Hello world" As Ptr,_
> title$ As Ptr,_
> wType As uLong,_
> r As Long
<snip>
For comparison, in BCET with this declare, either of these work:
-- sample --
DECLARE FUNCTION MessageBox Lib "User32" StdCall _
ALIAS "MessageBoxA" (BYVAL Handle AS LONG, _
BYVAL Message AS string, _
BYVAL Heading AS string, _
BYVAL Style AS LONG) AS LONG
Handle = 0
m$ = "Hello, World!"
h$ = "From a Compiled Basic Program"
Style = MbAbortRetryIgnore OR MbIconExclamation
R = MessageBox(Handle, m$, h$, Style)
R = MessageBox(Handle, "Hello, World!", _
"From a Compiled Basic Program", Style)
-- end sample --
I actually haven't tested this for the last few releases, but it used
to work. :-)
You could also DECLARE it as a SUB and ignore the return code.
--
ArarghMail804 at [drop the 'http://www.'
from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the extra stuff from the reply address.


|