Page 2 of 3

Posted: Fri Dec 09, 2005 3:25 pm
by blueznl
trust me, one day there's gonna' be a v4

and my oh my, do i bet there will be some major changes... and do i look forward to them, yeah!

how was it... what did jack burton always say...
This is Jack Burton in the Pork-Chop Express and I'm talkin' to whoever's listenin' out there. It's like I told my last wife, I says, "Honey, I never drive faster than I can see. Besides that, it's all in the reflexes."
You just listen to the Pork-Chop Express and take his advice on a dark and stormy night. When some wild-eyed, 8 foot tall, maniac grabs your neck, taps the back of your head up against a bar-room wall, he looks you crooked in the eye and asks you if you've paid your dues, you just stare that big sucker right back in the eye and remember what ol' Jack Burton always says at a time like that "Have you paid your dues, Jack?" "Yes sir, the cheque is in the mail."

You just listen to the old Pork-Chop Express here and take his advice on a dark and stormy night, when the lightning's crashin', the thunder's rollin' and the rain's comin' down in sheets thick as lead. Just remember what old Jack Burton does when the earth quakes and the poison arrows fall from the sky and the pillars of heaven shake. Yeah, Jack Burton just looks that big old storm right square in the eye and he says, "Gimme your best shot, pal. I can take it."
give us your best shot, fred, we can take it :-)

Posted: Fri Dec 09, 2005 4:04 pm
by Dare2
:D

Code: Select all

OpenWindow( #Window,                        _
               x, y,                        _
               InnerWidth,                  _  ; Not Outer!
               InnerHeight,                 _  ; Yoiks, can comment each part!
               #PB_Window_SystemMenu |      _  ; Gimme an eXit!
               #PB_Window_WindowCentered,   _  ; Look Ma ...
               "WooHoo"                     _  ; ... no sideways scrolling!
          )

Posted: Fri Dec 09, 2005 9:09 pm
by blueznl
turns out to be not too easy, at least to do it fast enough... let's turn it into a little coding challenge... see here

viewtopic.php?p=114887#114887

Posted: Fri Dec 09, 2005 10:18 pm
by Dr. Dri
no need for a "_"
it should be possible after any operator or separator (except this one -> )

Code: Select all

a + 2 + ;not finished line
a + 3   ;continues here

a + 2 + a + 3 ;same code
Dri

Posted: Sat Dec 10, 2005 3:15 am
by Dare2
I think I prefer continuation character, no ambiguity. More readable.

Code: Select all

a = b + c +        ; Obviously incomplete but ..
d + e              ; .. is this the continuation or incrementing d?

a = b + c          ; Looks complete but ..
+ d                ; .. is this an error or continuation?
Just MHO.

Posted: Sat Dec 10, 2005 4:38 am
by dagcrack
Dare2 wrote::D

Code: Select all

OpenWindow( #Window,                        _
               x, y,                        _
               InnerWidth,                  _  ; Not Outer!
               InnerHeight,                 _  ; Yoiks, can comment each part!
               #PB_Window_SystemMenu |      _  ; Gimme an eXit!
               #PB_Window_WindowCentered,   _  ; Look Ma ...
               "WooHoo"                     _  ; ... no sideways scrolling!
          )
Sounds like easy to implement on jaPBe but as said, then your sources wouldnt compile on other IDEs since they dont have their pre-processor ready for this.. But then, you could simply have a button "flatten" or something, so all the lines are flatten and you can share your nasty "codez"...

Posted: Sat Dec 10, 2005 9:19 am
by blueznl
well, like it or not, i've added it to codecaddy, some final stuff to be done...

Posted: Sat Dec 10, 2005 11:58 pm
by blueznl

Posted: Wed Apr 05, 2006 6:30 pm
by Kale
Kale wrote:Personally i like long lines and would never use this 'feature'. I think it looks like a mess and not very 'Pure', but this is just my opinion. :wink:
I've completely changed my mind on this subject and now i would very much like to see a continuation character added to PB too, to break up long lines.

I've now grown to like broken lines... :oops:

Any news on this Fred?

Posted: Wed Apr 05, 2006 6:35 pm
by Fred
It's still on the todo list ;).

Posted: Wed Apr 05, 2006 6:37 pm
by Shannara
DarkDragon wrote:(PureBasic = Basic) And (VisualBasic <> Basic).

IIRC Deeem2031 made a precompiler for this
Actually, the following looks more accurate:

(PureBasic <> Basic) And (VisualBasic <> Basic).

I believe PB have moved a bit from the Basic language just like VB, IB, RB, EB, etc. This is a good thing, IMO.

Posted: Wed Apr 05, 2006 6:43 pm
by blueznl
i have been called a turncoat by admitting i like like continuation characters as well :?

i just wonder what is the best approach... using a line continuation char at the END of the current line or at the BEGINNING of the next line...

although codecaddy does one at the end somehow the next sample looks quote good...

Code: Select all

; codecaddy style
;
a.s = "dit is een test en laten we wel wezen, dit " + _
  "is nog een test"

; at-the-beginning style
;
a.s = "dit is een test en laten we wel wezen, dit "
  _ + "is nog een test"

perhaps the second variant, although i haven't seen it in any language, may be the best option?

somehow this

Posted: Wed Apr 05, 2006 10:56 pm
by Kale
I like the continuation charater at the end of the line i think. :)

Code: Select all

;Open a window 
hWnd.l = CreateWindowEx_(0,_
								"WindowClass",_
								"Hello World",_
								#WS_VISIBLE | #WS_OVERLAPPEDWINDOW | #WS_SIZEBOX ,_
								WindowXPosition,_
								WindowYPosition,_
								WindowWidth,_
								WindowHeight,_
								0,_
								0,_
								GetModuleHandle_(#Null),_
								0)

auto-formatting and word-wrap

Posted: Wed Apr 05, 2006 11:01 pm
by USCode
If the IDE did auto-formatting then the IDE could just word-wrap the long lines and apply appropriate formatting to those lines. I've used an IDE that does this and it's VERY nice.

Posted: Thu Apr 06, 2006 11:27 am
by va!n
Fred: It's still on the todo list Wink.
Nice to hear :wink: