April 26, 2024, 11:42:38 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


$command

Started by ExMember001, September 23, 2007, 02:27:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

I just realize that i can use, example:
$command RedrawWindow(UINT hwnd,POINTER lprcUpdate,UINT hrgnUpdate,UINT flags)
instead of
declare import,RedrawWindow(UINT hwnd,POINTER lprcUpdate,UINT hrgnUpdate,UINT flags)

and it still works... is it unrecommended?

Ionic Wind Support Team

$command is used to define built in keywords. 

The correct syntax would be:

$command import, RedrawWindow(UINT hwnd,POINTER lprcUpdate,UINT hrgnUpdate,UINT flags)

The difference is a $command doesn't require parenthesis when used and if it is located in the default include files it will be syntax highlighted by the IDE.  If you omit the 'import' the linker will not associate it with an import library and you could end up calling the wrong function. 

There really isn't a good reason to use it.  Although no harm will come of it.

Paul.
Ionic Wind Support Team

ExMember001