Closed Thread Icon

Topic awaiting preservation: returning values (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12398" title="Pages that link to Topic awaiting preservation: returning values (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: returning values <span class="small">(Page 1 of 1)</span>\

 
bianca
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 09-03-2002 07:10

hi! how do i return more than 1 value from a function and how do i call it outside of the function? thanks.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 09-03-2002 08:45

You didn't specify in what programming language.

Anyway, the concept is the same, just pass array instead of single variable as return result...


lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 09-03-2002 08:58

You can also return an object.

in the case of javascript:

code:
return {value1:1234,value2:1122,value3:'hello world'};



bianca
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 09-04-2002 03:32

hey thanks...

« BackwardsOnwards »

Show Forum Drop Down Menu