October 31, 2025, 11:53:43 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


question about line continuation

Started by Guilect, May 28, 2010, 10:51:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guilect

Okay , I am ready to look silly on this one.
A most simple thing seems not to be working for me.
I wish to use line continuation to format the look of some code.
From the help file:
QuoteSource lines may be continued into the next editor line by appending an underscore _ after a comma or white space at the end of a line."
I have tried both an underscore imediately after the comma and an underscore after a space.
Yet, the following causes the parser to not like it.

What is the correct syntax to do this?
sub test4(a as int,_
b as int,_
c as int,_
d as int)

print str$(a+b+c+d)
end SUB

test4(0,1,2,3)

WAITCON
end


Thanks,
Guilect

LarryMc

May 28, 2010, 01:06:07 PM #1 Last Edit: May 28, 2010, 01:19:41 PM by Larry McCaughn
It appears that the portion of the parser that handles SUB statements does not recognize that rule.

For example, the following will work fine and I have used this structure in several programs:

sub test4(a as int,b as int,c as int,d as int)

print str$(a+b+c+d)
end SUB

test4(2,_
4,_
6,_
1)


WAITCON
end



LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Also this will work:

declare import, CreateWindowExA(dwExStyle:int, _
   lpClassName:string, _
   lpWindowName:string, _
   dwStyle:int, _
   x:int, _
   y:int, _
   nWidth:int, _
   nHeight:int, _
   hWndParent:int, _
   hMenu:int, _
   hInstance:int, _
   lpParam:pointer),HANDLE


LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Guilect

Thanks Larry.
Thought I might be using it incorrectly.

Maybe for v2.0 of IWB we can have that implemented  ;)