Create sub to qbasic style

Windows specific questions.
Post Reply
Tolo68
Posts: 105
Joined: Mar 30, 2020 18:18
Location: Spain

Create sub to qbasic style

Post by Tolo68 »

Hello everyone
It is possible to create a sub with this style ???

Sub MySub ( x, y), z
Print x
Print y
Print z
End Sub

I've read that it can be done with macros, but I'm not sure

Thank you
fxm
Moderator
Posts: 12132
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Create sub to qbasic style

Post by fxm »

caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Create sub to qbasic style

Post by caseih »

Curious as to why you'd want to use such a syntax style?

Obviously style is subjective, but I've always found this aspect of traditional BASIC syntax questionable.
Tolo68
Posts: 105
Joined: Mar 30, 2020 18:18
Location: Spain

Re: Create sub to qbasic style

Post by Tolo68 »

Thanks fxm, it went well for me!!!!
Now to see if this is possible...

Sub MySub ( x1, y1)-(x2, Y2), Var1 , Var2

What would it be to draw a QBasic-style line, the previous one was for Pset( X, Y), Color
I guess it could, because the GFXLIB library uses this syntax.
Greetings
paul doe
Moderator
Posts: 1736
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Create sub to qbasic style

Post by paul doe »

Tolo68 wrote: Aug 18, 2023 16:02 ...
I guess it could, because the GFXLIB library uses this syntax.
...
It uses the syntax for compatibility. Why would anybody want to use it willingly baffles me...
Tolo68
Posts: 105
Joined: Mar 30, 2020 18:18
Location: Spain

Re: Create sub to qbasic style

Post by Tolo68 »

paul doe wrote: Aug 18, 2023 16:43
Tolo68 wrote: Aug 18, 2023 16:02 ...
I guess it could, because the GFXLIB library uses this syntax.
...
It uses the syntax for compatibility. Why would anybody want to use it willingly baffles me...
Sorry Paul Doe, I unintentionally reported you.

Yes, it is to be compatible with VB6 syntax, which was the same as Qbasic. Best regards
fxm
Moderator
Posts: 12132
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Create sub to qbasic style

Post by fxm »


Like one of my previous posts (link above), I would suggest at most a syntax like:
MySub pt(X1, Y1), pt(X2, Y2), Var1, Var2
Post Reply