[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling function from various files
From: |
Lawrence Velázquez |
Subject: |
Re: Calling function from various files |
Date: |
Mon, 12 Apr 2021 22:56:59 -0400 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 |
On Mon, Apr 12, 2021, at 10:42 PM, michael-franzese@gmx.com wrote:
> termi-colr-wheel: * 79
> colr-test: ***
> Here is colr-fractr.sh
> colr-test: ***
> scout-terminfo-colours: **
>
> For some reoson I do still do not understand, I do not get the number 79
> next to the double and triple stars.
>
> Here is the code
>
> ./colr-tools.sh
> termi-colr-wheel ()
> { declare -rA tis=([cols]="$(tput cols)")
> echo "* ${tis[cols]} }
A variable "declare"-d without -g inside a function is local to
that function.
> echo "colr-test: *** ${tis[cols]}"
>
> source ./colr-fractr.sh
> echo "colr-test: *** ${tis[cols]}"
The "tis" array is not visible to these commands.
--
vq
- Calling function from various files, michael-franzese, 2021/04/12
- Re: Calling function from various files,
Lawrence Velázquez <=
- Re: Calling function from various files, Eduardo Bustamante, 2021/04/12
- Using Associative Arrays declared in functions, michael-franzese, 2021/04/13
- Re: Using Associative Arrays declared in functions, Alex fxmbsw7 Ratchev, 2021/04/13
- Re: Using Associative Arrays declared in functions, michael-franzese, 2021/04/13
- Re: Using Associative Arrays declared in functions, Alex fxmbsw7 Ratchev, 2021/04/13
- Re: Using Associative Arrays declared in functions, michael-franzese, 2021/04/13
- Re: Using Associative Arrays declared in functions, Alex fxmbsw7 Ratchev, 2021/04/13
- Re: Using Associative Arrays declared in functions, michael-franzese, 2021/04/13
- Re: Using Associative Arrays declared in functions, Alex fxmbsw7 Ratchev, 2021/04/13