Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Apply to all variables of x type

Author
Message
BriereAnthony
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 18th Mar 2011 04:01
Hello, I would like to know if it's possible to apply something to all variables of a certain type. Let's say I want all floats to increase by 1, is there a way to do this?

Thanks for your help!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Mar 2011 14:05
Sounds a bit like a risky operation. Why would you want to do that?

Not sure you can select a variable by type anyway...

There will be a better way to do what you are trying, could you tell us what exactly you are trying to do?

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 18th Mar 2011 20:31
Probably the best way is to make an array for each specific data type and use a FOR/NEXT loop to go through them all.



BriereAnthony
13
Years of Service
User Offline
Joined: 20th Feb 2011
Location:
Posted: 18th Mar 2011 23:34
Found another way to do what I wanted to do. What I wanted to do was increase the value of a variable within a TYPE, and that to all variables of that type.

Thanks for your help everyone, I used arrays to do what I wanted.

Login to post a reply

Server time is: 2024-11-24 06:35:40
Your offset time is: 2024-11-24 06:35:40