|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Invisible wrote:
>> Apparently Tcl isn't "major". ;-) It has precisely the same irritating
>> feature.
>
> It's not irritating, it's modular! ;-)
>
> Seriously, if you don't declare variables first, there really isn't a
> particularly good way of creating a global from inside a procedure, is
> there?
>
$GLOBALS['varname'] = "stuff";
(no, I'm not being serious)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Darren New wrote:
> Seriously, if you don't declare variables first, there really isn't a
> particularly good way of creating a global from inside a procedure, is
> there?
Yeah there is: Declare variables first. :-P
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> Darren New wrote:
>
>> Seriously, if you don't declare variables first, there really isn't a
>> particularly good way of creating a global from inside a procedure, is
>> there?
>
> Yeah there is: Declare variables first. :-P
Sure. That's what [global] gets you.
Anyway, [global] is a special case of [upvar] and just basically has
default arguments. Complaining you have to use [global] in Tcl is silly.
PHP has no [upvar], and PHP has "superglobals" which you don't have to
redeclare inside procedures, so it's just a mess.
--
Darren New / San Diego, CA, USA (PST)
On what day did God create the body thetans?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 5 Feb 2008 10:36:30 -0500, Warp wrote:
> echo
> 'hello ' .
> $user .
> ", how are you?\n";
Or rather:
echo
'hello ',
$user,
", how are you?\n";
Or in this case:
echo "Hello, $user, how are you?\n";
Interesting article touching the issue:
http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html
--
Joel Yliluoma - http://iki.fi/bisqwit/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 05 Feb 2008 13:51:33 -0200, Nicolas Alvarez wrote:
> Yes, and you can also pass multiple arguments to 'echo' (ie. what Warp
> said, but with a comma instead of the concat operator). It's probably a
> millisecond faster to do it that way too.
>
> http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html
Oh, already posted. :o
--
Joel Yliluoma - http://iki.fi/bisqwit/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 06 Feb 2008 11:52:41 +0000, Invisible wrote:
> Invisible wrote:
>> I just learned PHP. I feel unclean...
>
> Ooo... POST data has all single-quote characters escaped by prefixing
> with a backslash, and PHP doesn't unescape them before giving the string
> back to you. That's a nice feature.
\"Magic quotes\". Extremely annoying. Disable at sight.
--
Joel Yliluoma - http://iki.fi/bisqwit/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |