Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   Neuer Delphi Language Guide von Embarcadero (https://www.delphipraxis.net/145758-neuer-delphi-language-guide-von-embarcadero.html)

Medium 8. Jan 2010 22:06

Re: Neuer Delphi Language Guide von Embarcadero
 
Zitat:

Zitat von himitsu
Zitat:

Zitat von Medium
Das find ich garnicht übel :)

und was macht man da, wenn man ]] als Text im Kommentar haben will?

*schweig*

http://phrogz.net/lua/LearningLua_FromJS.html sagt dazu:

In Lua, a multi-line comment looks like --[[ ... ]]. In 5.0, nested pairs of [[ ... ]] may occur inside the comment. In 5.1, a multi-line comment can have an arbitrary number of paired equals signs (including none) at the ends: --[===[ ... ]===]

The magic of Lua's multi-line comment is that you can enable or disable the entire multi-line comment block with the addition or subtraction of a single character:
-- This is a single line Lua comment
local jim = "This is not commented"
--[[
local foo = "This code is not active"
local bar = "Neither is this code line"
--]]

local jam = "This line is active"
---[[
local foo = "This code is ALSO active"
local bar = "because of the extra hyphen above"
--]]


:zwinker:

(Und ich sage dazu: Schade, dass man keine URL in ein equote verschachteln kann :mrgreen:)
(Aso, das mit dem Ein/Ausschalten mit einem "-" mehr ist ohne deutliches Highlighting natürlich von fragwürdiger Lesbarkeit, macht in Anbetracht der Möglichkeit von "--[==========[" als Öffner aber doch schon wieder Sinn ^^)


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:45 Uhr.
Seite 3 von 3     123   

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