zsh-users
 help / color / mirror / code / Atom feed
* Array as parameter
@ 2011-11-02  3:35 meino.cramer
  2011-11-02  5:00 ` Wayne Davison
  0 siblings, 1 reply; 2+ messages in thread
From: meino.cramer @ 2011-11-02  3:35 UTC (permalink / raw)
  To: zsh-users

Hi,

how can I use an array as a parameter to a function like
this (example does not work...just as an explanation, what
I want to do)

    #! /bin/zsh
    funcion arrprint()
    {
        for i in $1
        do
            echo $i
            echo "---"
        done
    }

    a=( 1 2 3 4 5 6 )

    arrprint a 

when executed shoult print
1
---
2
---
3
---
4
---
5
---
6
---


Thank you very mich in advance for any help!
Best regards,
mcc



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-02  5:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-02  3:35 Array as parameter meino.cramer
2011-11-02  5:00 ` Wayne Davison

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).