Hi All,
I have some questions regarding array arguements passing for Perl Function.
If @array contains 2 items , arguements passing would be like Code_A.
But what if @array needs to add in more items, the rest of the code like $_ will have to be modified as well (highlighted in red), which is... (5 Replies)
Hi,
I'm trying to work on the script given below
#!/bin/ksh -x
pfile()
{
echo "$1"
}
touch smp19
echo "Hi" > smp19
result=$(pfile $smp19)
echo $result
As highlighted , when i pass $smp19 as parameter ,it does not display the output.However when i try giving "Hi" instead... (2 Replies)
Hi,
I'm trying to write a function that reassigns an array to
another local array but the method used in reassigning
the array reformats the contents of the array which is
what I am trying to prevent.
The method used to load a file into an array works as
expected and the entire array is... (4 Replies)
Let me know if there is a way to pass array to a funtion in ksh script.
function isPresent
{
typeset member
member=$1
dbList=$2
echo '$1:' $1
echo '$2' $dbList
The array will be at the second position....something like this
isPresent 12 <array>
if
then
echo... (3 Replies)
Hi.
I have a problem with passing two dimensional array to a function.
First, let me show my code to explain what i am going to do:
I have function:void initialize_board(char board);which is supposed to modify content of passed array. I have read here: Question 6.18 how such arrays should be... (3 Replies)
this is my code to try and prinnt out a deck of cards. the print function worked when used inside main without being a function but now i cant get it to work as a function probably since i dont know how to pass a struct array in c. I gave it a shot but i keep getting an assortment of errors. The... (0 Replies)
I'm working on AIX 6, ksh shell. The parameters are some strings quotated by double quotation marks which from a file. They are quotated because there may be spaces in them.
Example:
"015607" "10" " " "A"I want to pass these parameters to a shell function by writing the following command:
... (4 Replies)
Good grief so this should be easy. Passing an array as an argument to a function. Here is the sample code:
#/bin/bash
function foo {
local p1=${1}
local p2=(${2})
local p3=${3}
echo p1 is $p1
echo p2 is $p2
echo p3 is $p3
}
d1=data1
d2=data2
a=(bat bar baz) (2 Replies)
Hi,
I'm trying to write a bash script that takes a file and passes each line from the file into an array with elements separated by column.
For example:
Sample file "file1.txt":
1 name1 a first
2 name2 b second
3 name3 c third
and have arrays such as:
line1 = ( "1" "name1" "a"... (3 Replies)
Hi,
I'm playing with ksh. I'm trying to do a simple task:
read file name from cli and call a function which calculated number of lines in file.
I'm getting coredump every time when I try to read that file.
Korn shell version
$ print ${.sh.version}
Version AJM 93u+ 2012-08-01
Main... (5 Replies)
Discussion started by: solaris_user
5 Replies
LEARN ABOUT CENTOS
desktop_palette
desktop_palette(3alleg4) Allegro manual desktop_palette(3alleg4)NAME
desktop_palette - The palette used by the Atari ST low resolution desktop. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
extern PALETTE desktop_palette;
DESCRIPTION
The palette used by the Atari ST low resolution desktop. I'm not quite sure why this is still here, except that the grabber and test pro-
grams use it. It is probably the only Atari legacy code left in Allegro, and it would be a shame to remove it :-)
The contents of this palette are 16 colors repeated 16 times. Color entry zero is equal to color entry 16, which is equal to color entry
24, etc.
Index Color RGB values
0 White 63 63 63
1 Red 63 0 0
2 Green 0 63 0
3 Yellow 63 63 0
4 Blue 0 0 63
5 Pink 63 0 63
6 Cyan 0 63 63
7 Grey 16 16 16
8 Light grey 31 31 31
9 Light red 63 31 31
10 Light green 31 63 31
11 Light yellow 63 63 31
12 Light blue 31 31 63
13 Light pink 63 31 63
14 Light cyan 31 63 63
15 Black 0 0 0
SEE ALSO default_palette(3alleg4), black_palette(3alleg4)Allegro version 4.4.2 desktop_palette(3alleg4)