Einzelnen Beitrag anzeigen

Medium

Registriert seit: 23. Jan 2008
3.679 Beiträge
 
Delphi 2007 Enterprise
 
#21

Re: Neuer Delphi Language Guide von Embarcadero

  Alt 8. Jan 2010, 22:06
Zitat von himitsu:
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"
--]]




(Und ich sage dazu: Schade, dass man keine URL in ein equote verschachteln kann )
(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 ^^)
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
  Mit Zitat antworten Zitat