Recent

Author Topic: END keyword not uppercase.  (Read 10978 times)

segfault

  • Full Member
  • ***
  • Posts: 107
END keyword not uppercase.
« on: April 01, 2019, 02:42:17 pm »
This seems to be a bug, albeit a minor one. When selecting Tools/Options/Words/UPPERCASE the keywords are supposed to be uppercase when code is inserted, but "end" in procedures isn't. e.g. what you actually get is this :

Code: Pascal  [Select][+][-]
  1. PROCEDURE TForm1.Button1Click(Sender: TObject);
  2. BEGIN
  3.  
  4. end;    

I'm using Lazarus 2.0 on Win32.

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: END keyword not uppercase.
« Reply #1 on: April 01, 2019, 02:47:46 pm »
IT SHOULD BE ALL LOWERCASE. Uppercase was alright when Pascal got invented....We only had uppercase...
Give the eyes some rest, please, and don't ask for dinosaurs to be raised from the grave.
If there's an option for that, KILL IT:D 8-)
To some extend I would allow propercase: your own declarations, classes, records, objects and members of those.
« Last Edit: April 01, 2019, 02:51:57 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

segfault

  • Full Member
  • ***
  • Posts: 107
Re: END keyword not uppercase.
« Reply #2 on: April 01, 2019, 03:30:09 pm »
Quote
IT SHOULD BE ALL LOWERCASE

Is this the official line or the world as it should be according to Thaddy?  :D

I guess it's a matter of preference. I know keywords are bold but I don't see how uppercase makes MORE work for the eyes. Didn't you just use capitals in your reply for emphasis?  ;D


wildfire

  • Full Member
  • ***
  • Posts: 109
Re: END keyword not uppercase.
« Reply #3 on: April 01, 2019, 05:39:22 pm »
Is this the official line or the world as it should be according to Thaddy?  :D

It's generally accepted but as you know Pascal is case independent. If you're the only one reading your code then it's down to your preference.

I'm with Thaddy though, it's easier on the eyes if keywords are lower case.
A halo is a mere circle, when does it end?

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: END keyword not uppercase.
« Reply #4 on: April 01, 2019, 06:31:42 pm »
It is a matter of preference. Feel free to use it - in private -.... :-X
I don't like the view and I don't like a finger occupied uselessly while typing.
But indeed it is a matter of opinion, although most people use lowercase.
(Although I acknowledge that if the option is offered, it's a bug...)
« Last Edit: April 01, 2019, 06:43:31 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: END keyword not uppercase.
« Reply #5 on: April 01, 2019, 07:20:04 pm »
I vote for lower case too.
Although I was a BASIC lover.
(BASIC use uppercase)

wp

  • Hero Member
  • *****
  • Posts: 11911
Re: END keyword not uppercase.
« Reply #6 on: April 01, 2019, 07:23:12 pm »
Whatever the taste, it is a bug and should be reported in bug tracker.

ASerge

  • Hero Member
  • *****
  • Posts: 2240
Re: END keyword not uppercase.
« Reply #7 on: April 01, 2019, 07:25:39 pm »
Is this the official line or the world as it should be according to Thaddy?  :D
http://wiki.freepascal.org/Coding_style:
...See the Lazarus coding guidelines: DesignGuidelines:
...Since one style is easier to read, Lazarus follows the CodeGear Coding Style Guide lines:
...
3.6 Reserved Words
Reserved words and directives should be all lowercase. This can be a bit confusing at times. For instance types such as Integer are just identifiers, and appear with a first cap. Strings, however, are declared with the reserved word string, which should be all lowercase.

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: END keyword not uppercase.
« Reply #8 on: April 01, 2019, 07:34:13 pm »
Yes, but it is still a bug when such an option is offered and the end part end up as end. instead of END... This is the case, as wp and I noted.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

440bx

  • Hero Member
  • *****
  • Posts: 4014
Re: END keyword not uppercase.
« Reply #9 on: April 01, 2019, 08:45:15 pm »
The whole lowercase and uppercase thing is a bit strange.  The majority of COBOL programs are all written in uppercase and, COBOL in lowercase looks strange. 

I remember using a computer that used BASIC and if you typed something in lowercase, it would automatically uppercase it.   That pretty much settled the issue there... chuckle.

Pascal code doesn't look right in uppercase. 

Ultimately, except with case sensitive languages, it seems to be mostly subjective.

(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

BeniBela

  • Hero Member
  • *****
  • Posts: 906
    • homepage
Re: END keyword not uppercase.
« Reply #10 on: April 01, 2019, 10:28:54 pm »
I think we should all be more adventurous and use something more varied:


Code: Pascal  [Select][+][-]
  1. pRoCeDuRe TFoRm1.BuTToN1cLiCk(SeNdEr: ToBjEcT);
  2. BeGiN
  3.  
  4. EnD;    

Peter H

  • Sr. Member
  • ****
  • Posts: 272
Re: END keyword not uppercase.
« Reply #11 on: April 01, 2019, 10:32:11 pm »
Look here:
https://books.google.de/books/about/Algorithmen_und_Datenstrukturen.html?id=kKMDBgAAQBAJ&printsec=frontcover&source=kp_read_button&redir_esc=y#v=onepage&q&f=false
I personally, in the time of color pretty printing, prefer lowercase for keywords.

BTW, at page 38, there is the proof, Niklaus Wirth used "äöü..." in variable names. Can FPC do this? ;)
« Last Edit: April 01, 2019, 10:47:10 pm by Peter H »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: END keyword not uppercase.
« Reply #12 on: April 02, 2019, 11:01:33 am »
It is a personal taste thing, but I'm with mr. segfault here:  I find keywords uppercase and identifiers calmel-case (except constants) easier to read even with syntax highlighting.  May be because I'm used to it (I started with BASIC then QuickBASIC).
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

ASerge

  • Hero Member
  • *****
  • Posts: 2240
Re: END keyword not uppercase.
« Reply #13 on: April 02, 2019, 08:07:56 pm »
Of course, everyone likes its style, but when we publish code, uploaded on forum, need to adhere to common style. It's like social behavior: even if you're like to being naked at home, it's better not to do it on the street.
Moreover, when I see such code in FPC sources:
Code: Pascal  [Select][+][-]
  1. Procedure getdir(drivenr:byte;Var dir:shortstring);
I immediately get the feeling that the code was written by amateurs.
But if it is in the form:
Code: Pascal  [Select][+][-]
  1. procedure GetDir(DriveNumber: Byte; var Dir: ShortString);
this means that the author has published the code, knows how to work in a team and is probably more professional.

munair

  • Hero Member
  • *****
  • Posts: 798
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: END keyword not uppercase.
« Reply #14 on: April 02, 2019, 08:53:02 pm »
The days that BASIC used or converted keywords to uppercase also belongs to the dinosaurs. These days VisualBasic uses propercase aka titlecase by default. Personally I would vote for lowercase keywords and case dependency at the same time. :D
keep it simple

 

TinyPortal © 2005-2018