<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Although it already has been solved, I think the actual coding
problem which doesn't have to do with the Optional code wasn't
mentioned.<br>
<i>local </i>in an if-block means that it is only visible within
the if-block.<br>
<br>
if tacet~=nil then<br>
local tacet_text=tacet<br>
else<br>
local tacet_text="TACET"<br>
end<br>
print(tacet_text) --always prints nil, because tacet_text is
unknown<br>
<br>
So if you want to keep this if-else-statement, the correct solution
would be:<br>
<br>
local tacet_text<br>
if tacet~=nil then<br>
tacet_text=tacet<br>
else<br>
tacet_text="TACET"<br>
end<br>
print(tacet_text) --prints correctly<br>
<br>
However Robert's suggestion is more elegant:<br>
tacet=tacet or "TACET"<br>
<br>
Jan<br>
</body>
</html>