unused multiple return values

Anything related to Hollywood Designer goes in here

unused multiple return values

Postby r-tea » Mon Aug 28, 2017 9:58 am

There are functions that return multiple values at once. For example:
Code: Select all
ico_type, tt, deftool$ = GetIconProperties(prg_name$ .. ".info")

In this particular case I need only tooltypes array.
How to make the function return tooltypes only into a single variable on the left side?
User avatar
r-tea
 
Posts: 59
Joined: Wed Feb 17, 2016 12:48 am
Location: Zdzieszowice, Poland

Re: unused multiple return values

Postby airsoftsoftwair » Tue Aug 29, 2017 5:40 pm

That's not possible. If you don't need the first return value, just use a dummy variable.
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: unused multiple return values

Postby r-tea » Mon Sep 04, 2017 11:09 pm

airsoftsoftwair wrote:That's not possible. If you don't need the first return value, just use a dummy variable.


Another case worth to clarify in docs :)
User avatar
r-tea
 
Posts: 59
Joined: Wed Feb 17, 2016 12:48 am
Location: Zdzieszowice, Poland

Re: unused multiple return values

Postby airsoftsoftwair » Tue Sep 05, 2017 5:34 pm

r-tea wrote:Another case worth to clarify in docs :)


Ah, I think it's common sense. I've never seen a programming language which allows that. It would be very confusing.
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to General questions

Who is online

Users browsing this forum: No registered users and 2 guests