Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic General > Re: Rewrite BAS...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 666 of 684
Post > Topic >>

Re: Rewrite BASIC language today?

by ArarghMail804NOSPAM@[EMAIL PROTECTED] Apr 28, 2008 at 12:42 AM

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.
 




 3 Posts in Topic:
Re: Rewrite BASIC language today?
"news@[EMAIL PROTECT  2008-04-27 05:10:06 
Re: Rewrite BASIC language today?
"Gordon Rahman"  2008-04-28 00:42:29 
Re: Rewrite BASIC language today?
ArarghMail804NOSPAM@[EMAI  2008-04-28 00:42:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 14:24:10 CDT 2008.