Hi,

I got a problem with passing arguments to a function, its just me
being new to this I expect, any pointers would be GREAT!
I made a simple script that got the same behaviour as my orginal
one.
I want the output to be the same for both calls to the function
and not like it does

//script

REBOL [
  Title: "Strange."
  File: %"Strange.r"
  Author: "Pedro Tumusok"
  eMail: [EMAIL PROTECTED]
  ]

my-func: func [
  arg [block!]
  ]
[
  foreach [name value] arg [
    print ["Name: " name]
    print ["Value: " value]
  ]
]

my-func ["test" "test2"]

c1: "test3"
c2: "test4"

my-func [c1 c2]
]
//script

//output

REBOL/Core 2.3.0.4.2
Copyright 1997-2000 REBOL Technologies
REBOL is a Trademark of REBOL Technologies
All rights reserved.

Component: "Internet Protocols" (17-Jun-2000/1:53:16)
Finger protocol loaded
Whois protocol loaded
Daytime protocol loaded
SMTP protocol loaded
POP protocol loaded
HTTP protocol loaded
FTP protocol loaded
NNTP protocol loaded
Script: "REBOL Extended Definitions" (24-Jan-2000/2:53:35)
Script: "User Preferences" (11-Jul-2000/14:28:18+1:00)
Script: "Strange." (none)
Name:  test
Value:  test2
Name:  c1
Value:  c2

//output

--
With kind regards

    Jan Pedro Tumusok - ZyXEL Communications AS
    M�lleparken 4 - N-0459 Oslo - Norway
    Phone (+47) 22 80 61 80 - Fax (+47) 22 80 61 81
    Did you visit www.zyxel.no today ?

Reply via email to