Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-05

clarification / Re: constant-highlight ? [Re: quick opinion poll / pascal highlighting "case"]

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter E Williams

Hi Vannus & Waldo,

On Thu, 2010-05-27 at 14:40 +0200,
wrote:
Message: 9
Date: Thu, 27 May 2010 21:27:18 +0100
From: Vannus
Subject: On 27 May 2010 20:25, waldo kitty

On 5/26/2010 14:26, Vannus wrote: > IMO thats redundant lines + more scrolling to read the code.

whereas:-

Show quoted text 13 lines
> > if x then begin > code > end else begin > if y then begin > code > end else begin > code > end; > end; > > the above format hurts my eyes... i cannot see else, for one thing,

and

cannot separate out the individual code blocks... it is really bad

when it

spans 50 lines or more... especially when it covers several pages...

at that

point, you loose the rest of it...

Vannus> im looking for indents, your looking for begin/ends. i think this is where
Vannus> 'what your used to' comes in.. we both use what suits us. Vannus> when 'code' makes the 'if' big, then i put the 'code's into their own
Vannus> procedures/functions. keeps things neat & orderly. imho what the 'if' is
Vannus> doing is seperate from what the 'code' is doing.

Vannus> taking the AI perpective:-
Vannus> 'if' - making decision.
Vannus> 'code' - acting on decision.

Vannus> this lets you debug/maintain the decisions making from the acting on
Vannus> decisions easily, and lets others pick up whats going on quickly..

Please take a look here:

http://en.wikipedia.org/wiki/Dangling_else

it is a discussion of the classic programming problem of the Dangling Else which we learnt about at the Uni of Canberra in 1990.

involves less scrolling when its big, or when using smaller screen. >

I am using a 15.5" monitor on this pc. Currently Ubuntu 9 without Lazarus installed. Ubuntu 10.04 LTS does have Lazarus installed. Have not been able to install security fixes for either Ubuntu for a week :-(((

<snip>

Vannus> i find scrolling up & down constantly to make sure what i've done isn't
Vannus> going to adversely affect the other code (proof-read the code) is an
Vannus> unnecessary inconvenience.

Show quoted text 6 lines
where the semicolons should go is clear > every line is functional, no redundant lines > more like one-line if > hehehe... more like a one line program :P ;)

Vannus> i can only aspire to such things 8D

I am wondering what are your views on programs such as Code Browser (freeware cross platform)

http://tibleiz.net/code-browser/download.html

Peter W
Hobart, Australia

Reply by email

Vannus
to Peter E Williams

sorry for not replying sooner, i wanted to take the time to have a proper look at that code browser.

On 27 May 2010 22:48, Peter E Williams <

Show quoted text 8 lines
wrote: Hi Vannus & Waldo, I am wondering what are your views on programs such as Code Browser (freeware cross platform) http://tibleiz.net/code-browser/download.html

i like the principal, but ive not really managed to get it to do anything! (other than change tabs to 2 spaces)
the elastic tabstop looks interesting. i would certainly like to have the choice to be able to use it in delphi/lazarus.
proportional fonts, i could probably get used to that - after all, its how emails look. but it would require elastic tabstops to work well.

the biggest problem would be the files remaining readable in good ol' text editor. i guess if the tabs were replaced by spaces when saved, and then those spaces interpreted as tabs when files were opened we could 'bridge the gap'.

Show quoted text 5 lines
Peter W Hobart, Australia

- V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100602/dead9673/attachment.html>

Reply by email

Graeme Geldenhuys
to Vannus

2010/6/2 Vannus :

the biggest problem would be the files remaining readable in good ol' text editor

It will be. Simply alignment (I'm not talking about indentation) might not be ideal. ET only adds one or two tab chacters - this will not break any editor.

. i guess if the tabs were replaced by spaces when saved, and then those spaces interpreted as tabs when files were opened we could 'bridge the gap'.

The ET plugin for gEdit can do this as well. But this is inherently problematic if the code is shared with other developers, so I would not recommend this. When gEdit (with Tab > Spaces conversion enabled) saves a file, it converts what you see, as closely as possible using spaces. If your ET indentation was set to 100px width, it will obviously not look nice for somebody that use 2 spaces indentation (2 spaces 100 pixel width).

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email