AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Mehrfarbige Kommentare in Delphi?

Ein Thema von Matze · begonnen am 15. Aug 2005 · letzter Beitrag vom 15. Aug 2005
 
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#1

Mehrfarbige Kommentare in Delphi?

  Alt 15. Aug 2005, 11:25
Hallo zusammen!

Ja das klingt erstmal sehr unsinnig, doch ich hätte gerne mehrfarbige Kommentare in Delphi, um genau zu sein, zweifarbige. Innerhalb von Prozeduren und Fuktionen etc. sollen Kommentare eine andere Farbe haben, als außer halb. Gibt es sowas irgendwie?

Grund ist der, dass der Code so (für mich) deutlich übersichtlicher wird, gerade, wenn er etwas länger ist. Im Folgenden ein kleines Beispiel, wobei man es da evtl. nicht versteht, wieso es übersichtlicher sein soll:

Aktuell:
Code:
[color=#008000]//==============================================================================
// Constructor to create TabSheets
//==============================================================================[/color]
[b]constructor[/b] TTabDoc.Create(AOwner:TComponent; DocType: integer; title: [b]string[/b]; FileName: string);
[b]var[/b]
  TBItem: TTBCustomItem;
[b]begin[/b]
  [color=#008000]//Show filename in caption[/color]
  Form1.Caption := ProgName + ' - ' + title;

  [b]inherited[/b] Create;

  [color=#008000]//Create Tabs to switch between documents[/color]
  DocTab := TTabSheet.Create(Application.MainForm); [color=#008000]//Maybe here a comment[/color]
  DocTab.PageControl := Form1.PageControl5;
  DocTab.Caption := title;

  [color=#008000]//Another comment[/color]
übersichtlicher finde ich folgendes, da die Funktionen einfach hervorgehoben werden:

Code:
[color=#008000]//==============================================================================
// Constructor to create TabSheets
//==============================================================================[/color]
[b]constructor[/b] TTabDoc.Create(AOwner:TComponent; DocType: integer; title: [b]string[/b]; FileName: string);
[b]var[/b]
  TBItem: TTBCustomItem;
[b]begin[/b]
  [color=#FFC600]//Show filename in caption[/color]
  Form1.Caption := ProgName + ' - ' + title;

  [b]inherited[/b] Create;

  [color=#FFC600]//Create Tabs to switch between documents[/color]
  DocTab := TTabSheet.Create(Application.MainForm); [color=#FFC600]//Maybe here a comment[/color]
  DocTab.PageControl := Form1.PageControl5;
  DocTab.Caption := title;

  [color=#FFC600]//Another comment[/color]
Gibt es sowas?
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:02 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz