Bug Shell() Object

Post Reply
Mike Sanders
Posts: 7
Joined: Wed Oct 09, 2019 6:04 pm
Contact:

Bug Shell() Object

Post by Mike Sanders »

Code: Select all

Sub Main
    Shell("Calc.exe", 1)
End Sub

Syntax error...
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3083
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Bug Shell() Object

Post by martin-k »

You are confusing function calls and statements.

Use either:

returnValue = Shell("Calc.exe", 1)

Or:

Shell "Calc.exe", 1
Martin Kotulla
SoftMaker Software GmbH
Mike Sanders
Posts: 7
Joined: Wed Oct 09, 2019 6:04 pm
Contact:

Re: Bug Shell() Object

Post by Mike Sanders »

Witness:

Shell("Calc.exe")
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3083
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Bug Shell() Object

Post by martin-k »

Yes, that happens to work because it has only one parameter. "Print 1" is the same as "Print (1)".

shell ("calc.exe"), 1 would also work because you are just bracketing one of its arguments.
Martin Kotulla
SoftMaker Software GmbH
Post Reply

Return to “BasicMaker 2021 for Windows”