09-03-2018
Why and how do you expect varying results i.e. non-repeating numbers when running functions with non-varying, constant parameters?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
i have been trying to get a script working that can take in more than one option using getopt. But for some reason, even when i type in a covered option, it skips directly to my error message of "no match." Any ideas of what might be wrong?
set - 'getopt frd*: $*'
for i in $*
do... (6 Replies)
Discussion started by: gammarays
6 Replies
2. Programming
Hello ,
How to resolve below compilation error.activity_type is a member of structure and the output from databse will be stored in structure.Expected output wil l be either D or N or C .
sample struct format:
struct a{
char acAtivity_type;
}
code:
switch (a->activity_type)... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies
3. Shell Programming and Scripting
I am just learning Tcl and there are few things about it that is perplexing me. I have a question about the switch statement.
Why are these two switch statements giving me different results?
$ cat test_switch.tcl
#!/usr/bin/tcl
set foo "abc"
switch abc a - b {puts "No. 1"} $foo {puts... (2 Replies)
Discussion started by: SFNYC
2 Replies
4. Shell Programming and Scripting
Hey ,
I'm trying to perform the following command, however it cannot read the variable assigned earlier. I'm not sure why this happen. Please help thanks
while :
do
echo "what's ur name? (if none just press )"
read name
changeName = echo $name | sed "s/on/ey/"
echo $changeName #this... (8 Replies)
Discussion started by: sexyTrojan
8 Replies
5. Shell Programming and Scripting
I started writing a script to save the files from a camera I got the other day, which mounts in /Volumes , and I got into it and started building this menu. The only problem is that the switch case is coming up as a syntax error at the parenthesis after a case. Here is the code:
while :
do
... (2 Replies)
Discussion started by: snakemasterAK
2 Replies
6. Emergency UNIX and Linux Support
i want to create loop for below mentioned
A1=`echo $obj1 | cut -d "," -f3`
A2=`echo $obj1 | cut -d "," -f4`
A3=`echo $obj1 | cut -d "," -f5`
A4=`echo $obj1 | cut -d "," -f6`
A5=`echo $obj1 | cut -d "," -f7`
A6=`echo $obj1 | cut -d "," -f8`
A7=`echo $obj1 | cut -d "," -f9`
A8=`echo $obj1... (3 Replies)
Discussion started by: pasricha.kunal
3 Replies
7. Shell Programming and Scripting
Hello
i have a requirement where in a file i will get string. The length could be from 1 to 20. if the string is less than 6 characters ( ex: ABCD) . i need to append 'X' on right hand side to make it 6 characters (ex: ABCDXX). if suppose i get the same string from the file as ABCDXX then i... (5 Replies)
Discussion started by: dsdev_123
5 Replies
8. Programming
Hi
Am pretty new to C..
Am trying to pass the arguments from command line and use them in switch case statement..
i have tried the following
#include <stdlib.h>
main(int argc, char* argv)
{
int num=0;
if ( argc == 2 )
num = argv;
printf("%d is the num value",num);
switch ( num )
... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
9. UNIX for Dummies Questions & Answers
I need to implement a looping logic.
If then
Go to /path1/file*
Get all the filename starting with file* and store it in a array
count file number and store it in variable like run
Ex: I found 3 file with starting file* so my run = 3
means my loop should run three time
May be... (1 Reply)
Discussion started by: Nsharma3006
1 Replies
LEARN ABOUT CENTOS
glbindfragdatalocationindexed
GLBINDFRAGDATALOCATI(3G) OpenGL Manual GLBINDFRAGDATALOCATI(3G)
NAME
glBindFragDataLocationIndexed - bind a user-defined varying out variable to a fragment shader color number and index
C SPECIFICATION
void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const char *name);
PARAMETERS
program
The name of the program containing varying out variable whose binding to modify
colorNumber
The color number to bind the user-defined varying out variable to
index
The index of the color input to bind the user-defined varying out variable to
name
The name of the user-defined varying out variable whose binding to modify
DESCRIPTION
glBindFragDataLocationIndexed specifies that the varying out variable name in program should be bound to fragment color colorNumber when
the program is next linked. index may be zero or one to specify that the color be used as either the first or second color input to the
blend equation, respectively.
The bindings specified by glBindFragDataLocationIndexed have no effect until program is next linked. Bindings may be specified at any time
after program has been created. Specifically, they may be specified before shader objects are attached to the program. Therefore, any name
may be specified in name, including a name that is never used as a varying out variable in any fragment shader object. Names beginning with
gl_ are reserved by the GL.
If name was bound previously, its assigned binding is replaced with colorNumber and index. name must be a null-terminated string. index
must be less than or equal to one, and colorNumber must be less than the value of GL_MAX_DRAW_BUFFERS if index is zero, and less than the
value of GL_MAX_DUAL_SOURCE_DRAW_BUFFERS if index is greater than or equal to one.
In addition to the errors generated by glBindFragDataLocationIndexed, the program program will fail to link if:
o The number of active outputs is greater than the value GL_MAX_DRAW_BUFFERS.
o More than one varying out variable is bound to the same color number.
NOTES
Varying out varyings may have locations assigned explicitly in the shader text using a location layout qualifier. If a shader statically
assigns a location to a varying out variable in the shader text, that location is used and any location assigned with
glBindFragDataLocation is ignored.
ERRORS
GL_INVALID_VALUE is generated if colorNumber is greater than or equal to GL_MAX_DRAW_BUFFERS.
GL_INVALID_VALUE is generated if colorNumber is greater than or equal to GL_MAX_DUAL_SOURCE_DRAW_BUFERS and index is greater than or equal
to one.
GL_INVALID_VALUE is generated if index is greater than one.
GL_INVALID_OPERATION is generated if name starts with the reserved gl_ prefix.
GL_INVALID_OPERATION is generated if program is not the name of a program object.
ASSOCIATED GETS
glGetFragDataLocation() with a valid program object and the the name of a user-defined varying out variable
glGetFragDataIndex() with a valid program object and the the name of a user-defined varying out variable
SEE ALSO
glCreateProgram(), glLinkProgram()glGetFragDataLocation(), glGetFragDataIndex()glBindFragDataLocation()
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/.
AUTHORS
opengl.org
opengl.org 06/10/2014 GLBINDFRAGDATALOCATI(3G)