IonicWind Software

IWBasic => General Questions => Topic started by: ExMember001 on September 23, 2007, 02:27:57 PM

Title: $command
Post by: ExMember001 on September 23, 2007, 02:27:57 PM
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?
Title: Re: $command
Post by: Ionic Wind Support Team on September 23, 2007, 02:36:39 PM
$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.
Title: Re: $command
Post by: ExMember001 on September 23, 2007, 02:49:55 PM
ok, thank you  ;)