arg = [[Any other arguments in here?]]
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

arg = [[Any other arguments in here?]]

Started by kepp, 10 January, 2004, 02:15:12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kepp

Is it possible to do add arguments inside these blocks?

any = [[ ]]

or is it just for plain text?
Guarding    

pHaTTy

i dont understand what you mean, can you explain?
Resistance is futile!

kepp

ok.. hmm

BotName = "Cowboy"

disp = [[Hello "..BotName.." ]]
Guarding    

plop

QuoteOriginally posted by kepp
ok.. hmm

BotName = "Cowboy"

disp = [[Hello "..BotName.." ]]
disp = ("hello"..BotName.." rest of the text "..anotherargument.." some more text")

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

kepp

I know that :)

But i saw something like this in the manual

text_to_display = [[

hello, i saw this examle in the manual
more text
and some more
]]
Guarding    

NotRabidWombat

read more of the manual ;-)
[[ ]] is an extended string deliminator so you can include endlines

[[
Hello
this is
a test
]];

is equivalent to

"Hello\nthis is\na test\n";

you can not include arguments in there like php. You can include arguments in [ ] which is used for indexing tables.

-NotRabidWombat


I like childish behavior. Maybe this post will be deleted next.

plop

yep, they only take strings.
for example
print("http://board.univ-angers.fr">lua board")
would give an error on the " in the url.
you would either need 2 use format 2 make all the escapes or do it yourself by hand.
this is much easyer.
print([[http://board.univ-angers.fr">lua board]])
if you search your book for [[ you'll see that it's mostly used on website's or 2 show program pieces.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

kepp

Ok, because i was gonna use it for JavaScript and it would be great if i could take and put LUA in it :)
Guarding    

SMF spam blocked by CleanTalk