[REBOL] Re: need help with comparison operator <> evaluation
From: maximo:meteorstudios at: 14-Nov-2003 11:50
this works for me:
INPUT-FILE: ask "enter filename: "
ext: either ((length? INPUT-FILE) > 3) [
copy at INPUT-FILE((length? INPUT-FILE) - 3)
][
""
]
print ext
if ext <> ".txt" [INPUT-FILE: append INPUT-FILE ".txt"]
print INPUT-FILE
;------------------------------------------------
or if using more recent version of rebol core(2.5.2 +)
;------------------------------------------------
input-file: ask "enter filename: "
ext: suffix? input-file
print ext
if ext <> %.txt [input-file: append input-file ".txt"]
print input-file
-MAx