I've looked through the docs, and forum. The latest I found was an entry
from several months ago. Was this ever corrected so we could wrap long
lines of code?
;------------------------------------------------------------
; create a main window
;------------------------------------------------------------
mainWin = OpenWindow(#PB_Any, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_SizeGadget |#PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered)
vs.
;------------------------------------------------------------
; create a main window
;------------------------------------------------------------
mainWin = OpenWindow(#PB_Any, ;; create a window and assign id to mainWin
0, 0, 270, 140, ;; window size
"ListViewGadget", ;; name of window appears in title bar
#PB_Window_SystemMenu | ;; include a system menu
#PB_Window_SizeGadget | ;; allow resizing
#PB_Window_MinimizeGadget | ;; allow minimize button
#PB_Window_MaximizeGadget | ;; allow maximize button
#PB_Window_ScreenCentered) ;; center on screen
there's no need to write long lines since PB is not an interpreted language.
literals and constants are processed at compiletime, no speed gain in putting it in one line.
Last edited by Kaeru Gaman on Wed Mar 03, 2010 6:19 pm, edited 1 time in total.
;------------------------------------------------------------
; create a main window
;------------------------------------------------------------
mainWin = OpenWindow(#PB_Any, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_SizeGadget |#PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered)
vs.
;------------------------------------------------------------
; create a main window
;------------------------------------------------------------
mainWin = OpenWindow(#PB_Any, ;; create a window and assign id to mainWin
0, 0, 270, 140, ;; window size
"ListViewGadget", ;; name of window appears in title bar
#PB_Window_SystemMenu | ;; include a system menu
#PB_Window_SizeGadget | ;; allow resizing
#PB_Window_MinimizeGadget | ;; allow minimize button
#PB_Window_MaximizeGadget | ;; allow maximize button
#PB_Window_ScreenCentered) ;; center on screen
Using my preprocessor LPP, it would look something like this:
$Lpp
;------------------------------------------------------------
; create a main window
;------------------------------------------------------------
mainWin = OpenWindow(#PB_Any, _ ;; create a window and assign id to mainWin
0, 0, 270, 140, _ ;; window size
"ListViewGadget", _ ;; name of window appears in title bar
#PB_Window_SystemMenu | _ ;; include a system menu
#PB_Window_SizeGadget | _ ;; allow resizing
#PB_Window_MinimizeGadget | _ ;; allow minimize button
#PB_Window_MaximizeGadget | _ ;; allow maximize button
#PB_Window_ScreenCentered) ;; center on screen