Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

loading logic! values...

 [1/5] from: maximo:meteorstudios at: 13-Jan-2004 18:14


has anyone noticed that logic values do not keep their types when saved and reloaded. yep when they are reloaded they become word (always?) values.!!! this is especially bad in a situation where code is saved and is the block to define an object. try this: --------- blk: compose [(true)] outer-blk: compose/only [a (blk)] probe outer-blk print type? outer-blk/a/1 ==logic then: newblk: mold outer-blk probe newblk b: load newblk probe b probe type? b/a/1 == word! This is giving me headaches... loading back saved files changes the types of data elements for which I have to react to type. does anyone have an idea ?! -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.

 [2/5] from: brett:codeconscious at: 14-Jan-2004 11:00


> has anyone noticed that logic values do not keep their types when saved
and reloaded.
> yep when they are reloaded they become word (always?) values.!!!
I've never used it but I believe the /ALL refinement of MOLD was created specifically for sort of thing you are trying to do here. Regards, Brett.

 [3/5] from: atruter:labyrinth:au at: 14-Jan-2004 11:49


> has anyone noticed that logic values do not keep their types when saved > and reloaded. >> save/all %a.txt reduce [none true false date!] >> b: load %a.txt
== [none true false date! ]
>> type? b/1
== none!
>> type? b/2
== logic!
>> type? b/3
== logic!
>> type? b/4
== datatype!
> This is giving me headaches...
try: load mold/all reduce Regards, Ashley<

 [4/5] from: g:santilli:tiscalinet:it at: 14-Jan-2004 9:58


Hi Maxim, On Wednesday, January 14, 2004, 12:14:31 AM, you wrote: MOA> has anyone noticed that logic values do not keep their MOA> types when saved and reloaded. Why do you think we got MOLD/ALL? :P Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

 [5/5] from: maximo::meteorstudios::com at: 14-Jan-2004 9:50


thanks Gabrielle and others :-) Now I know when to use the serialized data format/types?. I had come accross it a few times (even on this list) and never got why it was even neccessary in rebol... now its more than obvious. -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.