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 / External Input for functions

Author
Message
Cygnus
17
Years of Service
User Offline
Joined: 11th Aug 2007
Location:
Posted: 5th Oct 2007 20:59 Edited at: 5th Oct 2007 21:52
Is there a way to influence the behavior inside a function without specification in a parameter? I feel the way functions cut themselves off from the rest of the program is rather restrictive. I want to both influence external variables and allow external variables to influence my function. I mean yeah you get your one line where you can output an internal variable, but its just not enough sometimes
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 5th Oct 2007 23:08
Hum, no posts?

Quote: "Everyone's entitled to an opinion...but your opinions are wrong."

Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 5th Oct 2007 23:08
What's happened here then? I can't see any posts.

Quote: "Everyone's entitled to an opinion...but your opinions are wrong."

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2007 13:07
When someone on approval edits a post, that post gets resubmitted for approval.

@Cygnus,
You can use a global variable (or an array if using DBC)



Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th Oct 2007 14:34
Or if using DBC, you can use DarkEDIT which supports global variables.

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
Cygnus
17
Years of Service
User Offline
Joined: 11th Aug 2007
Location:
Posted: 19th Oct 2007 01:02
what is DBC? global highlights as a command but it doesn't seem to work for me. it discourages me from using functions and makes me want to just stick with subroutines.
Cygnus
17
Years of Service
User Offline
Joined: 11th Aug 2007
Location:
Posted: 19th Oct 2007 04:25
ok, i got my global variables to work. the problem was that i would define variable x as global, but using it as a parameter overrided that.



when i changed it to this it worked


although i still don't know what DBC means

Login to post a reply

Server time is: 2024-09-27 05:07:19
Your offset time is: 2024-09-27 05:07:19