- Oct
- 364
- 17
Rex indicated that a user-defined variable can have the same name as a TCC internal variable and TCC will look to the user-defined variable before looking to the internal variable.
Example on date 8/18/2018:
echo %_date
{ shows: 8/18/18 }
set _date=Somebody's Birthday
echo %_date
{ shows: Somebody's Birthday}
The attached file takes a sample date in the format YYYYMMDD and changes all the date variables to match that. First it will display the real values, then the fake values, then the real values again.
The purpose of the "date change" routine is for software testing and development of date-based code, such as "Will this code I'm writing in 2018 actually do in February 2019 what I think it will do?"
If the command line includes a date, the program will use that date as the fake value. If there is no date it will use 19501118.
Example on date 8/18/2018:
echo %_date
{ shows: 8/18/18 }
set _date=Somebody's Birthday
echo %_date
{ shows: Somebody's Birthday}
The attached file takes a sample date in the format YYYYMMDD and changes all the date variables to match that. First it will display the real values, then the fake values, then the real values again.
The purpose of the "date change" routine is for software testing and development of date-based code, such as "Will this code I'm writing in 2018 actually do in February 2019 what I think it will do?"
If the command line includes a date, the program will use that date as the fake value. If there is no date it will use 19501118.