In the above the value of target is not being propagated to the function while ideally it should be since typeset variables are visible in sub functions
What is the issue here
The issue is that "$target" is assigned some unspecified value "$server_type", which may contain either an empty value or might be undefined or maybe contains characters with a special meaning to the shell so that they become interpreted because the variable "$server_type" is used without proper quoting.
In addition, you seem to have no firm grasp of the variable scope in shell languages. The "typeset" keyword just declares a variable. You need to "export" them to make them available in subshells.
To top it off the concept of using a variable from the calling function is flawed in itself: if you want to pass some value to a subfunction use some explicit mechanism, like passing a parameter:
Finally, you have neither supplied complete code (because the snippet you presented seems to be only a small incomplete part) and you haven't shown any output the complete script has produced. How are we supposed to find out what went wrong with such incomplete data? We're admins, not psychics.
Hi all,
I have problem understanding shell script.Written that
$bindir/put_load.ksh ; typeset RV= $?
I dont have any other document about script. How can i find that $bindir is exist or not what is the content of that, i am working on new box . how can i search that in old box what... (4 Replies)
I have found this command *typeset* and the option * -f *, which should provide me the list of all the currently defined functions. Is there any possibility of specifying the file in which this command to search ? (1 Reply)
Hi,
Could any one please explain about typeset or share any link from where i can study about typeset i.e how to use it, how to define it.. etc?
Thanks-
Yogi (3 Replies)
Hi,
Can any one please explain me the use of 'typeset' in shell scripting?
I donot under stand the use and advantages of using typeset.
In one of our script, it is written like typeset VERBOSE NO_UPDATE
typeset LOAD_SYBASE_TABLES
I donot understand what actually these lines do.
As per my... (2 Replies)
Hi,
All the scripts we have here use typeset instead of normal variables.
They don't have any parameters, they just get declared at the beginning of the scripts like this: typeset var1 var2 var3Could anyone tell me why this is done? I don't see the advantage in this over using normal variables. (1 Reply)
Hi,
As per my understanding typeset wil lmake a variable constant or readonly and -i option will make a variable integer. But please see the below outputs
typeset -i abc=000001;echo $abc
1
typeset -i abc=0000010;echo $abc
8
typeset -i abc=00000100;echo $abc
64
typeset -i... (3 Replies)
Hi All,
typeset -Z4 curtime command is giving different result than expected inside scripts in linux.But it gives expected results outside the scripts.Can you please help us
---------- Post updated at 05:37 AM ---------- Previous update was at 05:25 AM ----------
curTime=`date +%H%M`... (5 Replies)
I don't have man typeset entry in unix.
what is the use of typeset command and can you give some examples for that. (1 Reply)
Discussion started by: ramkumar15
1 Replies
LEARN ABOUT OSX
glgetqueryiv
GLGETQUERYIV(3G) OpenGL 3.3 GLGETQUERYIV(3G)NAME
glGetQueryiv - return parameters of a query object target
C SPECIFICATION
void glGetQueryiv(GLenum target, GLenum pname, GLint * params);
PARAMETERS
target
Specifies a query object target. Must be GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_PRIMITIVES_GENERATED,
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, GL_TIME_ELAPSED, or GL_TIMESTAMP.
pname
Specifies the symbolic name of a query object target parameter. Accepted values are GL_CURRENT_QUERY or GL_QUERY_COUNTER_BITS.
params
Returns the requested data.
DESCRIPTION
glGetQueryiv returns in params a selected parameter of the query object target specified by target.
pname names a specific query object target parameter. When pname is GL_CURRENT_QUERY, the name of the currently active query for target, or
zero if no query is active, will be placed in params. If pname is GL_QUERY_COUNTER_BITS, the implementation-dependent number of bits used
to hold the result of queries for target is returned in params.
NOTES
If an error is generated, no change is made to the contents of params.
ERRORS
GL_INVALID_ENUM is generated if target or pname is not an accepted value.
SEE ALSO
glGetQueryObject(), glIsQuery()
COPYRIGHT
Copyright (C) 2005 Addison-Wesley. 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 GLGETQUERYIV(3G)