xsharp.eu • RUN Command
Page 1 of 1

RUN Command

Posted: Sun Jan 29, 2023 1:55 pm
by Neale
Hello

Using XVIDE the RUN Command will not work, code example;
METHOD ShowOpenReportEditor() AS VOID
//Purpose.......: Open report RP editor.
//Notes.........:
RUN ReportEditor.exe

RETURN

Error returned;
error XS0103: The name 'RUN' does not exist in the current context

There is a note in the Xsharp help file;
Note This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available.

I have not checked 'Ignore XSharpDefs.vh' in XVIDE, but I cannot see the RUN command in the header file? Should another reference be included?

Probably doing something wrong?

Neale

RUN Command

Posted: Sun Jan 29, 2023 4:47 pm
by Chris
HI Neale,

Looks like we have forgotten to implement this command, will log a bug report for this. Are you using it in a lot of places? If yes, I will send you some info how to include support for it now, but if you are only using it once or twice, I think it's better to replace the command with a call to System.Diagnostics.Process.Start() (which is what RUN will call internally anyway), which will also give you better control over the arguments and the way the process is run anyway.

.

RUN Command

Posted: Sun Jan 29, 2023 5:05 pm
by Neale
Hello Chris
Thanks for your help, didn't think about the .net way.
Had a quick look at System.Diagnostics.Process.Start() and as you say has a lot more control with arguments etc.

Best
Neale

RUN Command

Posted: Mon Jan 30, 2023 10:00 am
by robert
Neale,
You can also try this

_RUN("ReportEditor.exe")

That works in VO too.

Robert