Restored from previous forum. Originally posted by Stan.
I may have overlooked it ... But I need to wrap long lines in the editor :
for instance :
PrintN( "aaaaa" + "bbbbb" + "ccccc" + "ddddd" + ... + "zzzz" )
as
PrintN( "aaaaa" + "bbbbb" + "ccccc"
+ "ddddd" + ... + "zzzz" )
Is that possible ?
TIA
Learning and Love are what life is all about ... [ PB. registered user ]
[Implemented] Wrapping long lines in editor
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
continuation" code (space then underscore), so hopefully Fred will implement
it one day. .
PB - Registered PureBasic Coder
Not yet. I suggested it in the past, by way of emulating Visual Basic's "linePrintN( "aaaaa" + "bbbbb" + "ccccc"
+ "ddddd" + ... + "zzzz" )
Is that possible ?
continuation" code (space then underscore), so hopefully Fred will implement
it one day. .
PB - Registered PureBasic Coder
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi El_Choni:
I think line wrapping with automatic indentitaion would not really easy to code and to be understand from the compiler..!? Btw, i have tested my PB editor v.290 and i have not found any row (linelengh) limit... Arent 1000 chars in one line enough?
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Mhhhh... surely it would be a nice feature for some coders... but i dont needed this until now and i think who are coding professional (not all conditions i.e. in one line ) dont really need this...!? Please dont misunderstand me...El_Choni wrote:
Personally, I'd prefer plain line wrapping (with automatic indentation), just the way TextPad allows you to do. But, again, everybody may have an opinion on this.
Hi El_Choni:
I think line wrapping with automatic indentitaion would not really easy to code and to be understand from the compiler..!? Btw, i have tested my PB editor v.290 and i have not found any row (linelengh) limit... Arent 1000 chars in one line enough?
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
Hi MrVain:
My intention is far from coding huge lines. I want automatic line wrapping because very often the line goes past the right border, and you have to scroll right, which is what annoys me (i.e., any OpenWindow line often does this). And, if the line is wrapped, I'd like it to maintain the indentation of the previous line so things don't get messed up. And one of the reasons I'm asking for this is that the RichEdit class (which I guess is used by the editor) allows this behaviour easily.
But, as I said before, Thorsten, I guess everybody has his/her own preferences regarding code editing, so I don't really expect to see my opinion prevailing.
BTW, you're quite a massive poster! Trying to win your third star XD?
Bye,
El_Choni
Hi MrVain:
My intention is far from coding huge lines. I want automatic line wrapping because very often the line goes past the right border, and you have to scroll right, which is what annoys me (i.e., any OpenWindow line often does this). And, if the line is wrapped, I'd like it to maintain the indentation of the previous line so things don't get messed up. And one of the reasons I'm asking for this is that the RichEdit class (which I guess is used by the editor) allows this behaviour easily.
But, as I said before, Thorsten, I guess everybody has his/her own preferences regarding code editing, so I don't really expect to see my opinion prevailing.
BTW, you're quite a massive poster! Trying to win your third star XD?
Bye,
El_Choni
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
> not all conditions i.e. in one line ) dont really need this...!?
> Arent 1000 chars in one line enough?
1000 chars are not long enough for longs strings of text or complex maths
formulas that use many API constant names... And it also depends on your
screen's size... I use 640x480 on my laptop which means I can only ever see a
maximum of 77 characters on any line, which is very little, IMO.
For example, here's a long line from my vis2pure app. Yes, I know I could break
it down into two lines and use al$(ti)=al$(ti)+ but wouldn't that use more
memory and/or code, as opposed to doing it all in one line of code?
PB - Registered PureBasic Coder
Edited by - PB on 19 February 2002 04:41:20
> not all conditions i.e. in one line ) dont really need this...!?
> Arent 1000 chars in one line enough?
1000 chars are not long enough for longs strings of text or complex maths
formulas that use many API constant names... And it also depends on your
screen's size... I use 640x480 on my laptop which means I can only ever see a
maximum of 77 characters on any line, which is very little, IMO.
For example, here's a long line from my vis2pure app. Yes, I know I could break
it down into two lines and use al$(ti)=al$(ti)+ but wouldn't that use more
memory and/or code, as opposed to doing it all in one line of code?
Code: Select all
; This comment line is 77 chars long - the maximum view for a 640x480 screen.
al$(ti)=" SetWindowLong_("+Mid(a$,2,999)+"_hWnd,#GWL_STYLE,GetWindowLong_("+Mid(a$,2,999)+"_hWnd,#GWL_STYLE)|#BS_LEFTTEXT) ; Right-aligned."
PB - Registered PureBasic Coder
Edited by - PB on 19 February 2002 04:41:20
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by TronDoc.
as someone mentioned, indentation is a major cause of lines
going far to the right. but I find indentation helps make
my code much more readable.. ..until I've indented
several times and the line wraps back to the
start of the line which makes it even
more unreadable than before!
I don't have the answer, but I sure can generate the problems!
Joe
elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE
as someone mentioned, indentation is a major cause of lines
going far to the right. but I find indentation helps make
my code much more readable.. ..until I've indented
several times and the line wraps back to the
start of the line which makes it even
more unreadable than before!
Code: Select all
for somelongvariablenameAndOrfunction = 1 to someotherLongname step somebigvariablenameOrfunctionalso
do some really involved stuff
with maybe some select
and case choices with
a few if
else
endifs
and before you know it, your wrapping....
Joe
elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
hehe... hi all...
you all are right and you have really good reasons to implent auto warp wrap lines to one of the next version... Now i am on your site and want it too, hehe
Hi Elchoni
I agree... you are right in all points! Btw. do you really think that i´m a massive poster? If someone think that i flood this forum, please tell me and i will try to reduce it Bye @ all...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
hehe... hi all...
you all are right and you have really good reasons to implent auto warp wrap lines to one of the next version... Now i am on your site and want it too, hehe
Hi Elchoni
I agree... you are right in all points! Btw. do you really think that i´m a massive poster? If someone think that i flood this forum, please tell me and i will try to reduce it Bye @ all...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten