| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | XBOOT3.BTM |
Hello Jasen,
On Saturday November 09 2002 at 12:21,
Jasen Betts [3:640/531.42] wrote to Gerald Miller,
about: XBOOT3.BTM
JB> here's a solution to the date format problem.
JB> what I do is set up a variable containing the conversion expression
JB> that converts between date formats then just use that variable to
JB> extract a converted form of the date when reading the file... theat
JB> way the conversion only needs to be figured out once and can be reused
JB> af often as needed.
JB> text> %tempfile
JB> PATH\PROGRAM TO RUN ³AFTER³ ³ ³DAYS ³
JB> ³ DAYS³LAST RUN³NEXT RUN³ LEFT³ASK
JB> endtext
I "shortened" the above display because of word wrap...
JB> echo ÄÄÄÄ %{at}format[03.3,%country] %{at}repeat[Ä,32]Å%=
JB> ÄÄÄÄÄÅ%df%Å%df%ÅÄÄÄÄÄÅÄÄÄ >> %tempfile
JB> set orig=%{at}instr[48,8,%{at}line[%bootfile,2]]
This is "looking good" - I've got to put it into practise and do
some testing.
Originally, I was making a comparison of the Country Code embedded on line
2 of the data file and the current Country Code of the system running the
batch file .AND. a comparison of your:
set orig=%{at}instr[48,8,%{at}line[%bootfile,2]]
and doing a "hard" date format conversion if there was
inequality. I must incorporate your code into the _NEXT_ test batch....
:))
JB> iff %orig == %df then
JB> set dateconversion=%%date
JB> else
JB> :: build a date conversion expression in a variable...
JB> set dateconversion=%=
JB> %%{at}instr[%{at}index[%orig,%{at}instr[0,2,%df]],2,%%date]%{at}instr[2,1,%df]%=
JB> %%{at}instr[%{at}index[%orig,%{at}instr[3,2,%df]],2,%%date]%{at}instr[5,1,%df]%=
JB> %%{at}instr[%{at}index[%orig,%{at}instr[6,2,%df]],2,%%date]
JB> :: aren't interpreted languages fun!
JB> echo.
JB> echo Converting date format from %orig to %df using expression:
JB> set dateconversion
JB> echo.
JB> endiff
JB> unset orig df
I can't wait to see what happens here when I put in two LIES into the data
file.... I have a copy of that data file that I sent you where I had
changed the country code / date format. I will swap that file with the
current data file.
JB> do n=3 to %{at}lines[%bootfile]
JB> set prog=%{at}instr[0,41,%{at}line[%bootfile,%n]]
JB> set when=%{at}instr[42,5,%{at}line[%bootfile,%n]]
JB> :: convert last to local format
JB> set date=%{at}instr[48,8,%{at}line[%bootfile,%n]]
JB> set last=%dateconversion
JB> :: next is never used but I'll convert it too :)
JB> set date=%{at}instr[57,8,%{at}line[%bootfile,%n]]
JB> set next=%dateconversion
Next was a variable name that I assigned when I had presumed that certain
information was being copied to the tempfile instead of being updated. Now
that I know otherwise, I guess I can make some changes.... :))
JB> set left=%{at}instr[66,5,%{at}line[%bootfile,%n]]
JB> set ask=%{at}instr[72,1,%{at}line[%bootfile,%n]]
I'll have to get testing... Thanks.
Cheers ... Gerald
--- GoldED+/386 v1.1.5-21101
* Origin: Assembler Command: RRC; Rotate Random thru Carry. (1:342/512)SEEN-BY: 24/903 106/2000 120/544 123/500 140/1 342/5 512 400/300 633/104 260 SEEN-BY: 633/262 267 270 285 640/954 690/682 771/4020 774/605 2432/200 @PATH: 342/512 5 140/1 106/2000 123/500 774/605 633/260 285 267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.