Page 1 of 1

Using a variable within a string

Posted: Wed Jun 17, 2015 5:28 am
by Tal
How do I use a variable that is immediately followed by a string?
If this is my variable:
:global TEST "192.168.0.1"
and I want to use it like this:
:put $TEST/24
to write "192.168.0.1/24" to the screen, it fails.
Is there a right way to do this?

Re: Using a variable within a string

Posted: Wed Jun 17, 2015 9:52 am
by PaulsMT
{
:global TEST "192.168.0.1"
:put ("$TEST" . "/24");
}

Re: Using a variable within a string

Posted: Wed Jun 17, 2015 1:23 pm
by Tal
Thanks!