Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Declined A better variable!

Jul
7
2
IMHO the time has come to think not only about new commands and functions but also about a new way of defining variables.

In addition to the usual way, compatible with the old one, %variable% if, for example, at the beginning of the batch you put a command like

set enhanced variables

you can use the variables, again for example, as in php, simply by prefixing a $ to the variable name. From that moment we could do without the % symbol everywhere. For example:

set fname = "%@findfirst[pro *]"
echo First PRO file contains:
type %fname


would become

$fname = findfirst [pro *]
echo First PRO file contains:
type $fname


much more readable.
 
Last edited:

Similar threads

Back
Top