IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Doc on July 05, 2006, 12:54:16 PM

Title: SYSTEM statement in Aurora?
Post by: Doc on July 05, 2006, 12:54:16 PM
Hello Paul (or anyone else who wants to jump in here  ;) )

Using Aurora, I'm trying to resurrect a really old "fun project" that I originally started in IBasic, which brought a couple of questions to mind.

Is there yet an equivalent option available for the "SYSTEM" statment in IB?

Also, can Aurora source code be compiled from the command prompt?


I've searched the forum without finding anything helpful, so apologise in advance if either answer has already been given elsewhere around here.

-Doc-
Title: Re: SYSTEM statement in Aurora?
Post by: Ionic Wind Support Team on July 05, 2006, 01:23:03 PM

Here is the Aurora equivelent.


global sub main()
{
system("notepad.exe","test.txt");
}

DECLARE IMPORT,ShellExecuteA(UINT hwnd,pointer pOp,pointer pFile,pointer pParam,pointer pDir,int nShow),UINT;

SUB SYSTEM(STRING command, OPT STRING param)
{
ShellExecuteA(0,"open",command,param,0,1);
}


You can compile from the command line, but it's a complex procedure since you need to call the compiler, assembler and linker in the proper order. 

Paul.
Title: Re: SYSTEM statement in Aurora?
Post by: Doc on July 05, 2006, 01:31:48 PM
Thank you kind sir. :)

-Doc-
Title: Re: SYSTEM statement in Aurora?
Post by: Zen on July 05, 2006, 05:25:44 PM
Yes its not too hard. Perhaps using a batch file or one of the GPL MAKE programs. Aurora Live basicly calls each seperate program and opens a pipe to listen to the compulers output etc.

Lewis
Title: Re: SYSTEM statement in Aurora?
Post by: ExMember001 on July 14, 2006, 09:34:54 AM
why when i use system("charmap.exe");  in my Onmenupick  i got this error?
Compiling Resources
Compiling...
Popotte.src
File: C:\Documents and Settings\Martin\Mes documents\Aurora source\Popotte.src (394) Warning: undeclared function 'system'
C:\Documents and Settings\Martin\Mes documents\Aurora source\Popotte.src:394: error: symbol `system' undefined
C:\Documents and Settings\Martin\Mes documents\Aurora source\Popotte.src:518: error: phase error detected at end of assembly.
Error(s) in assembling "C:\Documents and Settings\Martin\Mes documents\Aurora source\Popotte.asm"

ive try to declare it but doesnt work too.
Title: Re: SYSTEM statement in Aurora?
Post by: ExMember001 on July 14, 2006, 09:42:40 AM
ok i understand lol... forget that :)