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 » Sat Aug 01, 2020 7:04 am

Code: Select all

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

Syntax error...

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

Re: Bug Shell() Object

Post by martin-k » Sat Aug 01, 2020 8:52 am

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 » Sat Aug 01, 2020 1:17 pm

Witness:

Shell("Calc.exe")

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

Re: Bug Shell() Object

Post by martin-k » Sat Aug 01, 2020 1:39 pm

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”