Hi,
I am writing a bash shell script. I would like to execute a statement only if an array contains a specific value. For example:
array=(1 3 5 7)
I would like to execute the statement only if the value 3 is present in ${array}.
Thanks for any help,
Mike (1 Reply)
Hi,
I am trying to assign an array as a value to one of the array element, I mean
I have an array @KS and array @kr.
I want array @KS to hold @kr as an element.
So I am doin this
$KS=@kr;
But the value stored is number of elements in the @kr array.
Can... (2 Replies)
Hi All
I need to get <STDIN> from a user. the <STDIN> is a range of number delimited by "," (comma) and can be with range delimited by "-".
Example: 1,2,3,4-9,12,15,34-36,70
Now I need to get this from the user and go on each number and "Do something"... but when trying to do this as above... (2 Replies)
here is what i have...
i=1
while read line
do
if grep -i-q "create procedure"<<<$line
then
startline="$line"
endline="blahblah"
Get procedure name into a variable named procName
procName="procedure name is stored"
do some... (2 Replies)
I am writing the code in perl.
I have an array in perl and each variable in the array contains the data in the below format
Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
I hate I'm asking for help again. Unfortunately it seems there just aren't any links I can find on making an array that holds a bunch of two dimensional arrays. Maybe my google-fu is lacking. Basically I have a header file like this:
#define MATRIX 10
int white_l1;
int white_l2;
int... (2 Replies)
Corona688 was great in helping me learn how to create arrays that hold other two dimensional array here. Unfortunately I didn't think ask about how to implement or call them. Basically, I'm trying to call an array of two-dimensional arrays like this:
declaration:
int (*side_one) = { { white_l1,... (6 Replies)
Le sigh... Hopefully this will be the last time I have to ask for help on this topic. For a while now I've been working with a 1d array that holds 2d arrays. For reference you can view here. Now I'm just trying to loop through the elements with the following:
#include <stdio.h>
void... (3 Replies)
Discussion started by: Azrael
3 Replies
LEARN ABOUT MOJAVE
glgenvertexarrays
GLGENVERTEXARRAYS(3G) OpenGL 3.3 GLGENVERTEXARRAYS(3G)NAME
glGenVertexArrays - generate vertex array object names
C SPECIFICATION
void glGenVertexArrays(GLsizei n, GLuint *arrays);
PARAMETERS
n
Specifies the number of vertex array object names to generate.
arrays
Specifies an array in which the generated vertex array object names are stored.
DESCRIPTION
glGenVertexArrays returns n vertex array object names in arrays. There is no guarantee that the names form a contiguous set of integers;
however, it is guaranteed that none of the returned names was in use immediately before the call to glGenVertexArrays.
Vertex array object names returned by a call to glGenVertexArrays are not returned by subsequent calls, unless they are first deleted with
glDeleteVertexArrays().
The names returned in arrays are marked as used, for the purposes of glGenVertexArrays only, but they acquire state and type only when they
are first bound.
ERRORS
GL_INVALID_VALUE is generated if n is negative.
SEE ALSO
glBindVertexArray(), glDeleteVertexArrays()
COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication
License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
OpenGL 3.3 03/08/2011 GLGENVERTEXARRAYS(3G)