Click here to Skip to main content
16,020,424 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to call a function after unordered input? Pin
sanyexian25-Aug-10 21:23
sanyexian25-Aug-10 21:23 
AnswerRe: How to call a function after unordered input? PinPopular
Steven J Jowett25-Aug-10 22:21
Steven J Jowett25-Aug-10 22:21 
QuestionGet the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 12:06
Sam Martini25-Aug-10 12:06 
AnswerRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 12:25
sitebuilderLuc Pattyn25-Aug-10 12:25 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 13:21
Sam Martini25-Aug-10 13:21 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 13:32
sitebuilderLuc Pattyn25-Aug-10 13:32 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 13:54
Sam Martini25-Aug-10 13:54 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 13:59
sitebuilderLuc Pattyn25-Aug-10 13:59 
Sam Martini wrote:
How "x" knows that it should return it is new value to "a"?


it doesn't. By using the ByRef keyword, what gets passed is not the number 12 but the address of something that holds the value 12. If the calling parameter is a simple variable (or an array element), it would be the address of that variable/element, otherwise (i.e. when it is a constant or an expression) the expression gets evaluated, its value stored in a temporary location (say on stack), and the address of that result gets passed. All that is the compiler's job.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 14:20
Sam Martini25-Aug-10 14:20 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 14:22
sitebuilderLuc Pattyn25-Aug-10 14:22 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler26-Aug-10 2:55
johannesnestler26-Aug-10 2:55 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini26-Aug-10 4:21
Sam Martini26-Aug-10 4:21 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler3-Sep-10 23:05
johannesnestler3-Sep-10 23:05 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini5-Sep-10 6:55
Sam Martini5-Sep-10 6:55 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler5-Sep-10 12:17
johannesnestler5-Sep-10 12:17 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini5-Sep-10 23:49
Sam Martini5-Sep-10 23:49 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Dave Kreskowiak26-Aug-10 3:37
mveDave Kreskowiak26-Aug-10 3:37 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini26-Aug-10 4:46
Sam Martini26-Aug-10 4:46 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler3-Sep-10 23:18
johannesnestler3-Sep-10 23:18 
JokeRe: Get the Variable name which passed the value to the Parameter Pin
Peter_in_278025-Aug-10 13:48
professionalPeter_in_278025-Aug-10 13:48 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 13:56
sitebuilderLuc Pattyn25-Aug-10 13:56 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Peter_in_278025-Aug-10 14:33
professionalPeter_in_278025-Aug-10 14:33 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
PIEBALDconsult25-Aug-10 15:53
mvePIEBALDconsult25-Aug-10 15:53 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 16:42
sitebuilderLuc Pattyn25-Aug-10 16:42 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 14:16
Sam Martini25-Aug-10 14:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.