Page 1 of 1

envvar naming

Posted: Sun Nov 08, 2015 4:29 pm
by Raziel
Hi devs,

Are envvars limited to letters when using them in DOS scripts?
I tried to distinguish some vars by using a "." and the scripts started to act ill.

Example:
This script works as expected.

Code: Select all

requestchoice >ENV:rcnumtest "Test" "Test" "One" "Null/Cancel"

if $rcnumtest EQ 1
	echo "One"
	SKIP Finish
endif

echo "Null"

LAB Finish
While this script doesn't...

Code: Select all

requestchoice >ENV:rcnum.test "Test" "Test" "One" "Null/Cancel"

if $rcnum.test EQ 1
	echo "One"
	SKIP Finish
endif

echo "Null"

LAB Finish
Just want to know if it' s meant to be that "special" chars aren't allowed in envvars or if it's a limitation or maybe even a regression?

Thanks a lot

Re: envvar naming

Posted: Sun Nov 08, 2015 5:00 pm
by thomasrapp
You can enclose the variable name in braces (a.k.a. curly brackets) if you need special characters, for example ${rcnum.test}

Re: envvar naming

Posted: Mon Nov 09, 2015 6:29 am
by Raziel
Arrgh, i should have read the DOS manual before i start doing things...of course, stupid me

Thanks Thomas

Re: envvar naming

Posted: Tue Nov 10, 2015 12:32 am
by ssolie
thomasrapp wrote:You can enclose the variable name in braces (a.k.a. curly brackets) if you need special characters, for example ${rcnum.test}
I'm having a tough time finding this on the AmigaOS wiki.

Where was this documented in the original Amiga reference books?

Re: envvar naming

Posted: Tue Nov 10, 2015 7:52 am
by colinw
http://wiki.amigaos.net/wiki/AmigaOS_Ma ... ng_Scripts

Under "Dot Commands", .bra and .ket can also redefine the character used.