codice-temp: "C001" do reduce [to-set-word codice-temp copy []]
how do I check dynamically if the series C001 has been created ?
I have tried this > type? get first [codice-temp] == string!
But as you see it does not work
sqlab
type? get to-word codice-temp
sqlab
better to use
do reduce [to-set-word codice-temp 'copy []] or you will
always produce two copies
sorry I just have an non ergonomic keyboard so do reduce [to-set-word codice-temp 'copy []] type? get to-word codice-temp
GiuseppeC
Thanks, I am exploring dynamic table view creations with my small REBOL knowledge
sqlab
a shorter solution is set to-word codice-temp copy []
PeterWood
Is this method of providing "private" words in objects reliable?
>> a: make object! [ b: 1 set-b: func[v] [b: v] get-b: func[][b]] >> o: make object! [set-b: get in a 'set-b get-b: get in a 'get-b] >> unset 'a >> o/get-b == 1 >> o/set-b 2 == 2 >> o/get-b == 2
Maxim
in R3 yes.. in R2 its almost impossible since you can always get a function's body.
but I prefer this pattern: >> o: get in context [ [ priv: 1 [ pub: context [ set-b: func[v] [priv: v] b: func[][get 'priv]] [ ] 'pub >> o/b == 1 >> o/set-b 2 == 2 >> o/b == 2 >> words-of o == [set-b b]
Yoi have to manually set the date of the new file to the date of the old file
Gregg
touch: func [ {Set the modification timestamp of the file.} files [file! block!] "The file, or files, you want to stamp" /with "Use a specified time rather than the current time." time [date! file!] "The date and time to stamp them with" /local read-only? ][ if not with [time: now] if file? time [time: modified? time]
; Do we want to do this? if 0:00 = time/zone [time/zone: now/zone]
; We have to turn off the read-only attribute if it's on. foreach item compose [(files)] [ read-only?: not get-modes item 'owner-write ;print ['touching item 'with time] set-modes to-file item [owner-write: true modification-date: time] if read-only? [set-modes item [owner-write: false]] ] ; Should we return the time, even though it may not match the actual ; stamp on the files due to OS differences? ;time ]