IDE multiline
IDE multiline
How is the exact syntax to work with?
Re: IDE multiline
Here a small example:
Code: Select all
Procedure Test(a, ; first parameter
b,
c) ; last parameter
Debug a
Debug b
Debug c
EndProcedure
OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "Test",
#PB_Window_SystemMenu |
#PB_Window_MinimizeGadget)
Test(10, 20,
30)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: IDE multiline
Hello,
Thank you for the example, nevertheless when I use this construction:
where I want to suppress part of the second line like this:
produces "garbage" error
Thank you for the example, nevertheless when I use this construction:
Code: Select all
query0$ = "Select typ,px,py,d1,d2,d,l,Id,typ from Ofenkonstruktion Where ('" + Str(x) + "'>=x1) And ('" + Str(x) + "'<x2) And"
query0$ = query0$ + " Ort='" + var_ort$ + "' And Ofen='" + var_ofen$ + "' order by px;"
Code: Select all
query0$ = "Select typ,px,py,d1,d2,d,l,Id,typ from Ofenkonstruktion Where ('" + Str(x) + "'>=x1) And ('" + Str(x) + "'<x2) And",
+ " Ort='" + var_ort$ + "' And Ofen='" + var_ofen$ + "' order by px;"
produces "garbage" error
Re: IDE multiline
Code: Select all
query0$ = "Select typ,px,py,d1,d2,d,l,Id,typ from Ofenkonstruktion Where ('" + Str(x) + "'>=x1) And ('" + Str(x) + "'<x2) And" +
" Ort='" + var_ort$ + "' And Ofen='" + var_ofen$ + "' order by px;"

Line continuation feature, with the following operands: ',' '|' '+' And Or Xor
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: IDE multiline
I think it has more to do with the syntax error of a plus sign (+) following a comma (,).
Re: IDE multiline
Hello
Thank you ts-soft, it works. The syntax (',' '|' '+' And Or Xor) mad me run into trouble as I thought to use , (for and) to join the lines. I think the exact explanation when to use what has to be given in the future help of V5.1
michel
Thank you ts-soft, it works. The syntax (',' '|' '+' And Or Xor) mad me run into trouble as I thought to use , (for and) to join the lines. I think the exact explanation when to use what has to be given in the future help of V5.1
michel
Re: IDE multiline
You can linebreak after each operants, but not inside a stringliteral!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

- VB6_to_PBx
- Enthusiast
- Posts: 627
- Joined: Mon May 09, 2011 9:36 am
Re: IDE multiline
i like the new Line continuation option in version 5.10 Beta 1
Code: Select all
; _____Basic.pb
; VB6=1033x768 PureBasic=1017x730 -16,-38 for Resizable Window
OpenWindow(0, 0, 0, 1017, 730, "VB6=1033x768 PureBasic=1017x730",
#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget |
#PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow : End
EndSelect
ForEver
PureBasic .... making tiny electrons do what you want !
"With every mistake we must surely be learning" - George Harrison