09-05-2001
HI
Actually in Ansi version of c++ it is mandatory
to give static specifier during the declaration of an integer array to retain it's the contents during the execution of the program and the values are initialized only once .Without the static in the declaration the program produces unwanted and unexpected results.
10 More Discussions You Might Find Interesting
1. Programming
HI,
Here is some thing that is puzzling me from a long time.
Can some body explain me this with example.
The question is :-
What is the difference between function pointer and pointer to a function.
Where do we actually use the function pointers and pointer to functions.
Thanks in... (0 Replies)
Discussion started by: S.Vishwanath
0 Replies
2. Programming
hi all,
let say i have a pointer exit, and this exit will store some value. how can i store the value that the pointer points to into an array and then print them out from the array.
thanks in advance (2 Replies)
Discussion started by: dianazheng
2 Replies
3. Shell Programming and Scripting
Hi all
i wonder about function pointers as i never used them in my C code .
could any tell me why and where exactly function pointers come into
picture .
thanq (1 Reply)
Discussion started by: Raom
1 Replies
4. Programming
is this a valid c declaration
int (*ptr(int *b));
plz explain... (4 Replies)
Discussion started by: areef4u
4 Replies
5. Programming
Hi I mash with pointers in C. I solve this problem about 5 hours and I don't know how I should continue.
void InsertFirst (tList *L, int val) {
tElemPtr new;
if((new = malloc(sizeof(tElemPtr))) == NULL) Error();
new->data = val;
new->ptr = L->frst;
L->frst = new;... (2 Replies)
Discussion started by: Milla
2 Replies
6. Programming
I have a special character called ô. When it is declared as a character variable its showing it can be printed. But when it is declared as a character pointer variable its showing it cannot be printed. I am just wondering why its happening like this..
c1 = '@';
c2 = 'ô';
char *fp;
fp="XXô";
if... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies
7. Programming
Hi guys.
What is the difference between these:
1. int *a;
2. int (*a); (2 Replies)
Discussion started by: majid.merkava
2 Replies
8. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
9. Programming
Hi guys, I'm trying to understand pointers in C and made a simple example and I've problems with It.
Can someone help?
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int f1(char **str_);
int main(int argc, char **argv)
{
char *str = NULL;
f1(&str);
... (3 Replies)
Discussion started by: pharaoh
3 Replies
10. Programming
Hello, I read from a book exercise for a challenge. How to print out each letter of char array a by two different pointers pa and ppa in the example?
I have tried my code for letter "r" by testing without full understanding as only the first one worked.
#include<stdio.h>
int main()
{
char... (17 Replies)
Discussion started by: yifangt
17 Replies
LEARN ABOUT DEBIAN
extutils::xspp::node::function
ExtUtils::XSpp::Node::Function(3pm) User Contributed Perl Documentation ExtUtils::XSpp::Node::Function(3pm)
NAME
ExtUtils::XSpp::Node::Function - Node representing a function
DESCRIPTION
An ExtUtils::XSpp::Node subclass representing a single function declaration such as
int foo();
More importantly, ExtUtils::XSpp::Node::Method inherits from this class, so all in here equally applies to method nodes.
METHODS
new
Creates a new "ExtUtils::XSpp::Node::Function".
Named parameters: "cpp_name" indicating the C++ name of the function, "perl_name" indicating the Perl name of the function (defaults to the
same as "cpp_name"), "arguments" can be a reference to an array of "ExtUtils::XSpp::Node::Argument" objects and finally "ret_type"
indicates the (C++) return type of the function.
Additionally, there are several optional decorators for a function declaration (see ExtUtils::XSpp for a list). These can be passed to the
constructor as "code", "cleanup", "postcall", and "catch". "catch" is special in that it must be a reference to an array of class names.
resolve_typemaps
Fetches the ExtUtils::XSpp::Typemap object for the return type and the arguments from the typemap registry and stores a reference to those
objects.
resolve_exceptions
Fetches the ExtUtils::XSpp::Exception object for the %catch directives associated with this function.
add_exception_handlers
Adds a list of exception names to the list of exception handlers. This is mainly called by a class' "add_methods" method. If the function
is hard-wired to have no exception handlers, any extra handlers from the class are ignored.
print_declaration
Returns a string with a C++ method declaration for the node.
perl_function_name
Returns the name of the Perl function to generate.
is_method
Returns whether the object at hand is a method. Hard-wired to be false for "ExtUtils::XSpp::Node::Function" object, but overridden in the
ExtUtils::XSpp::Node::Method sub-class.
has_argument_with_length
Returns true if the function has any argument that uses the XS length feature.
ACCESSORS
cpp_name
Returns the C++ name of the function.
perl_name
Returns the Perl name of the function (defaults to same as C++).
set_perl_name
Sets the Perl name of the function.
arguments
Returns the internal array reference of ExtUtils::XSpp::Node::Argument objects that represent the function arguments.
ret_type
Returns the C++ return type.
code
Returns the %code decorator if any.
set_code
Sets the implementation for the method call (equivalent to using %code); takes the code as an array reference containing the lines.
cleanup
Returns the %cleanup decorator if any.
postcall
Returns the %postcall decorator if any.
catch
Returns the set of exception types that were associated with the function via %catch. (array reference)
set_static
Sets the "static"-ness attribute of the function. Can be either undef (i.e. not static), "package_static", or "class_static".
package_static
Returns whether the function is package static. A package static function can be invoked as:
My::Package::Function( ... );
class_static
Returns whether the function is class static. A class static function can be invoked as:
My::Package->Function( ... );
perl v5.14.2 2011-12-20 ExtUtils::XSpp::Node::Function(3pm)