Subj : Re: Varrible assignments
To   : Finnigann
From : Digital Man
Date : Sat Sep 08 2007 11:29 pm

 Re: Re: Varrible assignments
 By: Finnigann to Digital Man on Sat Sep 08 2007 11:18 pm

> -=> With regards to the social ramifications;
>      Digital Man wrote to Finnigann <=-
>
>  DM>   Re: Varrible assignments
>  DM>   By: Finnigann to All on Sat Sep 08 2007 10:42 am
>
>  >
>  >
>  >   How would I get the file extention into a varrible?
>  >
>  >   [Example]
>  >
>  >   Contest.845  file name,
>  >            ^^
>  >   which would change from week to week as part of the extention (last
>  >   two digits are the week of the year).
>  >
>  >   If your reply doesn't show how to get the file name into a varrible,
>  >   how might that be done, too.
>  >
>  >   advThanksance.
>  >
>  >   In the  I'm-gonna-hate-myself-in-the-morning dept...I downloaded Jas'
>  >   oneliner program (with .SRC) and am actually learning from it. Thanks.
>
>  DM> If the filename portion is fixed-length (e.g. always "Contest", 7
>  DM> chars), then the following would work:
>
>  DM> str extension
>  DM> copy extension filename
>  DM> shift_str extension 7     # filename portion is always 7 chars
>
>
>  Would the dot count as a space?

It's a character, yeah.

>  contest.845
>  12345678

Yeah, I usually think of the dot as part of the extension. Shift 8 chars if you
don't want the dot in your string.

>  DM> str extension           # defining varrible 'extention' as a string
>  DM> copy extension filename # I'm gonna have to hard code the filename
>                              # right?
>  DM> shift_str extension 7   # filename portion is always 7 chars
>
>
>  The filename (CONTEST) stays the same, will wild cards work in BAJA for
>  the extention?

In strings, any/all characters are valid.

>    copy extention contest.???  # Making sure that there are never more
>                                # than one file name in the work dir.

I'm not really sure what you're trying to do there. If you want to find if a
file exists on disk, using wildcards, use the CHKFILE function or the
OPEN_DIR/READ_DIR/CLOSE_DIR functions.

                                      digital man (xbox-live: digitlman)

Snapple "Real Fact" #123:
Beavers were once the size of bears.
Norco, CA WX: 67.6�F, 58% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net