• Varrible assignments

    From Finnigann@VERT/BNB to All on Sat Sep 8 06:42:00 2007
    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.



    _ _ _ _ _ _ _ _ _
    / \ / \ / \ / \ / \ / \ / \ / \ / \
    ( F | i | n | n | i | g | a | n | n )
    \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/


    ... Heisenberg may have slept here.
    --- MultiMail/Win32 v0.47
    þ Synchronet þ Bits-N-Bytes - bnb.dtdns.net / bnb.synchro.net
  • From Digital Man@VERT to Finnigann on Sat Sep 8 07:42:00 2007
    Re: Varrible assignments
    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.

    If the filename portion is fixed-length (e.g. always "Contest", 7 chars), then the following would work:

    str extension
    copy extension filename
    shift_str extension 7 # filename portion is always 7 chars

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #182:
    A rainbow can only be seen in the morning or late afternoon.
    Norco, CA WX: 79.3øF, 57% humidity, 0 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Finnigann@VERT/BNB to Digital Man on Sat Sep 8 19:18:00 2007
    With regards to the social ramifications;
    Digital Man wrote to Finnigann <=-

    Re: Varrible assignments
    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.

    If the filename portion is fixed-length (e.g. always "Contest", 7
    chars), then the following would work:

    str extension
    copy extension filename
    shift_str extension 7 # filename portion is always 7 chars


    Would the dot count as a space?

    contest.845
    12345678


    str extension # defining varrible 'extention' as a string
    copy extension filename # I'm gonna have to hard code the filename
    # right?
    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?

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



    _ _ _ _ _ _ _ _ _
    / \ / \ / \ / \ / \ / \ / \ / \ / \
    ( F | i | n | n | i | g | a | n | n )
    \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/


    ... Lean left. Nah, your OTHER left! - Crow as barber
    --- MultiMail/Win32 v0.47
    þ Synchronet þ Bits-N-Bytes - bnb.dtdns.net / bnb.synchro.net
  • From Digital Man@VERT to Finnigann on Sat Sep 8 19:29:00 2007
    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 <=-

    Re: Varrible assignments
    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.

    If the filename portion is fixed-length (e.g. always "Contest", 7 chars), then the following would work:

    str extension
    copy extension filename
    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.

    str extension # defining varrible 'extention' as a string copy extension filename # I'm gonna have to hard code the filename
    # right?
    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 þ [vert/cvs/bbs].synchro.net
  • From Finnigann@VERT/BNB to Digital Man on Sun Sep 9 00:28:00 2007
    With regards to the social ramifications;
    Digital Man wrote to Finnigann <=-

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

    If the filename portion is fixed-length (e.g. always "Contest", 7
    chars), then the following would work:

    str extension
    copy extension filename
    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.


    Good point! (pun intended)


    str extension # defining varrible 'extention' as a string copy extension filename # I'm gonna have to hard code the filename
    # right?
    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.


    My original thoughts were to code the CONTEST file for different weeks.
    The extention is code for sport and a week of play. As people submit
    their picks, the extention would be used to keep it all straight.

    Reading in files (with the picks) and writing out files with results.

    Although, in retrospect, all would be handled NOW and the week info
    wouldn't matter.

    The algorithm is a bit fuzzy in my head just now.



    _ _ _ _ _ _ _ _ _
    / \ / \ / \ / \ / \ / \ / \ / \ / \
    ( F | i | n | n | i | g | a | n | n )
    \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/


    ... "42? 7 and a half million years and all you can come up with is 42?!"
    --- MultiMail/Win32 v0.47
    þ Synchronet þ Bits-N-Bytes - bnb.dtdns.net / bnb.synchro.net