Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of 'this' pointer

Tags:

pointers

this

vba

Is there an equivalent of this pointer in VBA so that I can pass it to another module?

like image 642
DenMark Avatar asked Jul 07 '10 01:07

DenMark


People also ask

What is the equivalent of this in C++?

The C++ equivalent is this ; that is, the keyword is the same.

What does the this pointer point to?

The this pointer is a pointer accessible only within the nonstatic member functions of a class , struct , or union type. It points to the object for which the member function is called. Static member functions don't have a this pointer.

What is the equivalent of pointers in Java?

Java doesn't have pointers; Java has references.

Is this a pointer in C++?

The 'this' pointer is passed as a hidden argument to all nonstatic member function calls and is available as a local variable within the body of all nonstatic functions. 'this' pointer is not available in static member functions as static member functions can be called without any object (with class name).

Is this a pointer or a reference?

Pointers: A pointer is a variable that holds the memory address of another variable. A pointer needs to be dereferenced with the * operator to access the memory location it points to. References: A reference variable is an alias, that is, another name for an already existing variable.

What is this pointer Mcq?

Explanation: The pointer which denotes the object calling the member function is known as this pointer. The this pointer is usually used when there are members in the function with same name as those of the class members.


1 Answers

Not for a module, no. A module doesn't have an instance, so there is no instance variable to pass. All the methods are static. If you are within a class instance, however, you can use Me.

like image 69
Josh Avatar answered Sep 30 '22 02:09

Josh