Sponsored Content
Full Discussion: Array Element
Top Forums UNIX for Advanced & Expert Users Array Element Post 302927786 by cumeh1624 on Friday 5th of December 2014 12:38:45 PM
Old 12-05-2014
Array Element

This question is for someone that's more familiar with Array Element.

I need to know if the maximum array element that can be assigned is 1024 and if its so, Is there a workaround solution when the counter exceeded 1024?


Code:
 
param_array[counter]="$param_nam"
counter=$counter+1
#to avoid space issue in the param
eval real_value=\"param_value\"
param_array[counter]=\"$real_value\"
counter=$counter+1

When the parm_value is more than 750 we do lose parameter value and I need to find out if there is a workaround using array element since there is a limitation to it.

Our shell script is korn shell on AIX platform.

Thanks


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks

Last edited by vbe; 12-05-2014 at 01:42 PM.. Reason: code tags... not PARSE
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

accessing my first element of array

Hello everyonel, I have an array set like so num=4 read name arr=name I go through while loop to assign different values to different array element from 1 to 4. when I try to access the FIRST element of the array I get the last one first. Like if I say ${arr} it will show the last element... (4 Replies)
Discussion started by: afadaghi
4 Replies

2. Shell Programming and Scripting

Adding array element in KSH

All, I would like to add the first 10 elements of an array. Here is how I am doing it now (only included first few add ops): #!/usr/bin/ksh ###Grab the array values out of a file### TOTAL=`awk '/time/' /tmp/file.out | awk '{print $4}'` set -A times $TOTAL SUM=$((${times} + times... (3 Replies)
Discussion started by: Shoeless_Mike
3 Replies

3. Shell Programming and Scripting

Shift array element

I want to delete and 0th element of array in shell scrpit and also shift all others to one level up. (2 Replies)
Discussion started by: darshakraut
2 Replies

4. Shell Programming and Scripting

HELP unsetting array element in loop

I have a loop and I need to be able to unset the array element that I am currently accessing in it. I was thinking of making a counter that increments with the loop and doing unset $dirs but if I do that I am not sure if the other members of the array would get shifted down in index (meaning that... (2 Replies)
Discussion started by: msf5042
2 Replies

5. Shell Programming and Scripting

remove an element from array

I need to remove an element from the below array variable TABLENAME. #!/bin/ksh set -A TABLENAME "mirf roxar keke mirs" echo "the array is ${TABLENAME}" If i need to remove say keke and have the final TABLENAME as below, how this could be achieved. Pls throw some light. echo "Modified... (3 Replies)
Discussion started by: michaelrozar17
3 Replies

6. Shell Programming and Scripting

How to assign an array element to a variable

Hi every one.. I'm new to shell scripting... I would like to assign a single array element to a variable... Is it possible to do it.... Could any body help me.... (3 Replies)
Discussion started by: kaushik_87
3 Replies

7. Shell Programming and Scripting

previous element in the array perl

Hi, How to get previous/next element in the array perl Example @queue = (1, 2 ,3 , 4); I want to get value of 1 and 2, or, 2 and 3, or 3 and 4...etc and compare to value which one is greater to do that I need to get previous and next element of array ? (1 Reply)
Discussion started by: guidely
1 Replies

8. Emergency UNIX and Linux Support

Assigning zero to element of ksh array.

set -A matched #find referenced files. for i in ${file_names_html} do counter_j=0 for j in ${file_names_minus_index} do match=`cat $i | grep... (1 Reply)
Discussion started by: robin_simple
1 Replies

9. Programming

How to delete a duplicate element from below array.

Hello forum , Please solve the below queery. A sorted array which has repated elements. A = {1,2,3,3,4,5,5,5,6,9,9} i want to delete the duplicate elements and to genrate a new array. i need the array sholud be like this A = {1,2,3,4,5,6,9}. Please write the piece of code... (4 Replies)
Discussion started by: workforsiva
4 Replies

10. Shell Programming and Scripting

Multiplying array element

I am trying to take all the elements of an array and multiply them by 2, and then copy them to a new array. Here is what I have i=0 for true in DMGLIST do let DMGSIZES2="${DMGSIZES}"*2 let i++ done unset i echo ${DMGSIZES2} It does the calculation correctly for the first element,... (7 Replies)
Discussion started by: nextyoyoma
7 Replies
GLGETACTIVEATOMICCOU(3G)					   OpenGL Manual					  GLGETACTIVEATOMICCOU(3G)

NAME
glGetActiveAtomicCounterBufferiv - retrieve information about the set of active atomic counter buffers for a program C SPECIFICATION
void glGetActiveAtomicCounterBufferiv(Gluint program, GLuint bufferIndex, GLenum pname, GLint *params); PARAMETERS
program The name of a program object from which to retrieve information. bufferIndex Specifies index of an active atomic counter buffer. pname Specifies which parameter of the atomic counter buffer to retrieve. params Specifies the address of a variable into which to write the retrieved information. DESCRIPTION
glGetActiveAtomicCounterBufferiv retrieves information about the set of active atomic counter buffers for a program object. program is the name of a program object for which the command glLinkProgram() has been issued in the past. It is not necessary for program to have been linked successfully. The link may have failed because the number of active atomic counters exceeded the limits. bufferIndex specifies the index of an active atomic counter buffer and must be in the range zero to the value of GL_ACTIVE_ATOMIC_COUNTER_BUFFERS minus one. The value of GL_ACTIVE_ATOMIC_COUNTER_BUFFERS for program indicates the number of active atomic counter buffer and can be queried with glGetProgram(). If no error occurs, the parameter(s) specified by pname are returned in params. If an error is generated, the contents of params are not modified. If pname is GL_ATOMIC_COUNTER_BUFFER_BINDING, then the index of the counter buffer binding point associated with the active atomic counter buffer bufferIndex for program is returned. If pname is GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE, then the implementation-dependent minimum total buffer object size, in baseic machine units, required to hold all active atomic counters in the atomic counter binding point identified by bufferIndex is returned. If pname is GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS, then the number of active atomic counters for the atomic counter buffer identified by bufferIndex is returned. If pname is GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES, then a list of the active atomic counter indices for the atomic counter buffer identified by bufferIndex is returned. The number of elements that will be written into params is the value of GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS for bufferIndex. If pname is GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER then a boolean value indicating whether the atomic counter buffer identified by bufferIndex is referenced by the vertex, tessellation control, tessellation evaluation, geometry, fragment or compute processing stages of program, respectively, is returned. NOTES
glGetActiveAtomicCounterBufferiv is available only if the GL version is 4.2 or higher. GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER is available only of the GL version is 4.3 or higher. ERRORS
GL_INVALID_VALUE is generated if program is not the name of a program object for which glLinkProgram() has been called in the past. GL_INVALID_VALUE is generated if bufferIndex is greater than or equal to the value of GL_ACTIVE_ATOMIC_COUNTER_BUFFERS for program. GL_INVALID_ENUM is generated if pname is not one of the accepted tokens. SEE ALSO
glGetProgram(), glGetActiveSubroutineUniform(), glGetActiveSubroutineUniformName(), glGetUniformLocation() COPYRIGHT
Copyright (C) 2011 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/. AUTHORS
opengl.org opengl.org 06/10/2014 GLGETACTIVEATOMICCOU(3G)
All times are GMT -4. The time now is 01:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy