On 1/30/2008 9:10:42 PM, Ian Binnie wrote:
> On 1/30/2008 8:23:46 PM, Dale Cook wrote:
>> but that doesn't work - temp.txt ends
>> up as a zero-length file.
Date()does not return a string value.
To put date into register 10, use the following:
However, you do not need to write date in a register to get it in file. Just switch to the file (or tmp buffer) and use Out_Ins instead of Out_Reg.
> The following will insert date into a register.
> #28=Buf_Switch(Buf_Free) // working buffer
> Out_Ins() Date(NOMSG|REVERSE|NOCR)
You can insert date directly to register using Out_Reg, see above.
However, since manipulation is needed (increment date, add the filename extension), you need to insert it in a buffer.
Here is a test macro I made:
#10 = Num_Eval_Date() // #10 = Today's date as Julian number
Num_Ins_Date(#10+1,NORMAL+NOCR+VALUE,0) // write tomorows date
Del_Char(2) // remove first 2 digits of year