You want to see how R2 deals with memory ?
 With this few lines you can make some discoveries.


REBOL []

;*** create a string a get his address in memory
s: make struct! [str [string!]] ["start"]
from: to integer! reverse copy third s


int-bin: func [int][debase/base to-hex int 16]
get-value: func [from][
 hex: clear #{00000000000000000000000000000000}
 len: 16
 until [
  change third s reverse debase/base to-hex from 16
  str: copy/part either empty? s/str [#{00}][head insert tail copy s/str
#{00}] len
  insert tail hex str
  from: from + length? str
  0 = len: len - length? str
 ]
 hex
]


;**** Dump 30 values added after the initial value
;**** Each value in Rebol sizes a multiple of 16 bytes
loop 30 [
 found: get-value from
 print [int-bin from found as-string found]
 from: from + 16
]

halt


-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to