Script Library: 1238 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Discussion posts for script associate.r

1
brianwisti
3-Jan-2005 21:25
Silly question. Does this create something similar to an associative array (or 'hash' as the Perl world calls them)?
2
sunanda
3-Jan-2005 22:55

I think so. Here's some tricks with associate -- decide for yourself :-)

myAA: copy [] ;; start a new associative array

associate myAA 'today now

associate myAA 'myname 'Sunanda

associate myAA 'my age 21 ;; It was once. Then again later in hex.....

associate myAA 1-jan-2000 {new millennium}

associate myAA 15 [4 5 6] [1 2 3 4 5] ;; ways to sum 15 as consecutive integers

;; read some of them back:

associate? myAA 15

== [4 5 6] [1 2 3 4 5]

associate? myAA 'today

== 3-Jan-2005/22:17:39 ;; well, it was when I did it -- it's a static value

;; let's get a date that really does update itself:

associate myAA 'today [(now)]

compose associate? myAA 'today

;; result will change each time

;; being just a rebol block, I can write it to a file, and reload it later

write %myAA-file mold myAA

myAA: none ;; to prove it's gone

myAA: load %myAA-file

associate? myAA 15

== [4 5 6] [1 2 3 4 5] ;; same values as before

I could add the whole thing to another associate array

my-other-AA: copy []

associate my-other-AA 'AA1 myAA

;; I could even add it to itself:

associate myAA 'myAA myAA

3
sumnerzzupa
24-May-2021 3:56
REBOL

Neve encountered this before, but it seems good already.

Contents:

Placerville Dentistry

MakeDoc2 by REBOL- 24-May-2021
4
konstantinak
30-Aug-2021 5:35

South Korea has opened a new programming club at Soongsil University. Only a few students are allowed to attend the lectures of the famous US and UK professors who do these cheap writings https://domyassignment.pro/for an associate degree.

5
mark214
20-Nov-2021 20:29
REBOL

Great Post. Love it. landscaping in fresno

Contents:

MakeDoc2 by REBOL- 20-Nov-2021
6
marosol
10-Dec-2021 0:37
REBOL

Maybe you can.

Contents:

roofing milwaukee

MakeDoc2 by REBOL- 10-Dec-2021
7
crutcherhuyn
1-Mar 17:39
8
saruonhosari
10-Mar 4:47
REBOL

Being just a rebol block, I can write it to a file, and reload it later.

Contents:

mobile detailing

MakeDoc2 by REBOL- 10-Mar-2022
9
marie
16-Mar 8:43
REBOL

Wow the article you give us is amazing, no wonder many people want to read this.

Contents:

drywall repair in Sacramento, CA

MakeDoc2 by REBOL- 16-Mar-2022
10
danielperez1
28-Mar 5:53
REBOL

Ohh! this is so informative. Keep it up Hospitality Technology

Contents:

MakeDoc2 by REBOL- 28-Mar-2022
11
patricia
12-Apr 10:47
REBOL

Thanks for sharing this informative site. washer and dryer repair nyc

Contents:

MakeDoc2 by REBOL- 12-Apr-2022