Re: brand new to tcl; newbie question



On Apr 29, 2:13 pm, Bryan Oakley <oak...@xxxxxxxxxxxxxxxxxxxx> wrote:
chedderslam wrote:
I am only a couple of days into tcl and XOWiki. I am trying to call a
basic function but can't figure out how to call one.

proc test {} {
return "text to display"
}

proc content {} {
set somevar test()

return "$somevar"

}

How do you call a function?
i.e. in "set somevar test()" i want to call test...

Thank you.

set somevar [test]

Here is what I have:
-------------------------------------------------------
proc test {} {
return "text to display"
}

proc content {} {
set somevar test[]

return "$somevar"

}
-------------------------------------------------------
However, the output is "test" (without quotes)

This is on a XOwiki object page, btw, does that make a difference?

Thank you for the responses.
.



Relevant Pages

  • Re: brand new to tcl; newbie question
    ... basic function but can't figure out how to call one. ... proc test { ... return "text to display" ... i.e. in "set somevar test()" i want to call test... ...
    (comp.lang.tcl)
  • Re: brand new to tcl; newbie question
    ... basic function but can't figure out how to call one. ... proc test { ... i.e. in "set somevar test()" i want to call test... ... standard of nonconformity." ...
    (comp.lang.tcl)
  • brand new to tcl; newbie question
    ... I am only a couple of days into tcl and XOWiki. ... basic function but can't figure out how to call one. ... proc test { ... i.e. in "set somevar test()" i want to call test... ...
    (comp.lang.tcl)
  • Re: brand new to tcl; newbie question
    ... return "text to display" ... i.e. in "set somevar test()" i want to call test... ... it's another nonconformist who doesn't conform to the prevailing ... standard of nonconformity." ...
    (comp.lang.tcl)