Link to home
Start Free TrialLog in
Avatar of chrisha
chrisha

asked on

Visual Basic 6

What are return types?
I know one type is boolean.
Please give examples of other return types?
Avatar of jamauss
jamauss

If you are talking about variable types the amount is endless. But among the most used are

Integer
Boolean
Long
Double
String
Currency
Variant
Static

Is that what you are looking for?
A return type is the type of object returned by a procedure. Therefore a return type could be any object that vb has already defined ie integer, string, char, boolean, long... or some other object that you have defined.
Hope this answers your question,
che,
.././David
Return types can be explicitly state in the Function procedure header using either the As keyword or a type declaration character. i.e. you could write the definition of Area to return a single ....

private function area(s1 as single, s2 as single) as single

if using boolean,

 private function test() as boolean.
In addition to what jamauss said....."single" is also a variable type...don't know if this is what you want though.....these are variable types
In addition to what jamauss said....."single" is also a variable type...don't know if this is what you want though.....these are variable types you can also have "byte" and other things. you can check the declaration of variable types by typing:

(dim "variable_name" as) followed by a space. VB should display all the valid types automatically.

e.g. dim abc as  (notice the space at the end)
ASKER CERTIFIED SOLUTION
Avatar of paul_tsekov
paul_tsekov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Chrisha: Where are you? Please say something so we could be of any help to you.