Let's get programmy!
- ConansSideWalk
- Trying To Take Over The World!
Posts: 39
Re: Let's get programmy!
This is now the tech support thread!


Representing The Place I Love For The People Who Inhabit It. SOS団 Forever
- Kirbypepe
- Wonder what I'll turn into =D
Posts: 135- Contact:
Re: Let's get programmy!
Since when?
Howdy Everyone=]
Things are fantastic. How about for you?
Thats cool.
Wait I just realized, who am I talking to????
Things are fantastic. How about for you?
Thats cool.
Wait I just realized, who am I talking to????
- ConansSideWalk
- Trying To Take Over The World!
Posts: 39
Re: Let's get programmy!
since never pepe since never


Representing The Place I Love For The People Who Inhabit It. SOS団 Forever
-
- Community Hero
Posts: 4200
Re: Let's get programmy!
if you ask me for tech support I'm just gonna try to get you to wipe your hard drive. :V
- ConansSideWalk
- Trying To Take Over The World!
Posts: 39
Re: Let's get programmy!
It's ok I don't need it though I expect in the future some people will ask. xD These videos came to mind. http://www.youtube.com/watch?v=YqL95vk_5Ps http://www.youtube.com/watch?v=dlHcqSxy-ZE


Representing The Place I Love For The People Who Inhabit It. SOS団 Forever
-
- Community Villain
Posts: 3588
- aly_angelflight
- Get that squirrel!
Posts: 577
Re: Let's get programmy!
Or better yet, make sure it's plugged in and turned on. :x

3DS Friend Code: 2723-9258-9521
-
- DCTP Staff Hero
Posts: 3270
Re: Let's get programmy!
Not just the monitor, too.aly_angelflight wrote: Or better yet, make sure it's plugged in and turned on. :x

Your opinion is always requested in Abs.' Random Polls of Whenever
- Kirbypepe
- Wonder what I'll turn into =D
Posts: 135- Contact:
Re: Let's get programmy!
"Have you tried turning it off and on again?" =P
Howdy Everyone=]
Things are fantastic. How about for you?
Thats cool.
Wait I just realized, who am I talking to????
Things are fantastic. How about for you?
Thats cool.
Wait I just realized, who am I talking to????
-
- Community Hero
Posts: 4200
Re: Let's get programmy!
saw someone write an awesome program to help you calculate how much to tip a waiter at a restaurant
Spoiler:
Spoiler:
- Kirbypepe
- Wonder what I'll turn into =D
Posts: 135- Contact:
Re: Let's get programmy!
Akonyl wrote: saw someone write an awesome program to help you calculate how much to tip a waiter at a restaurant
Spoiler:Spoiler:
XD that is sooooo hilarious. Best program ever =P
and I'm in the same boat as you akonyl
Howdy Everyone=]
Things are fantastic. How about for you?
Thats cool.
Wait I just realized, who am I talking to????
Things are fantastic. How about for you?
Thats cool.
Wait I just realized, who am I talking to????
- Callid
- Ratio vincit omnia.
Posts: 1433
Re: Let's get programmy!
Hmm, I've been wondering for a while - is it possible (in Java) to call a function by its name? I.e. I have somehow generated a String, which is the name of a function, and now I want to call the function using that String. Of course, I could do that by something like:
However, this will get quite impractical with a high number of functions. I'd want something like this:
Of course, having references to functions would be even better, but I doubt something like this exists 
Code: Select all
// s is generated String
if (s.equals("myfucntion1")) { myfunction1(); }
 else if (s.equals("myfucntion2")) { myfunction2(); }
   else if (s.equals("myfucntion3")) { myfunction3(); }
    else if (s.equals("myfucntion4")) { myfunction4(); }
      else if (s.equals("myfucntion5")) { myfunction5(); }
      // and so on
Code: Select all
public boolean callFunction (String s) {
 // calls the function with a name equivalent to the String. If it doesn't exist, does not call any function and returns false, else true.
}

If
,
,
,
,
,
,
or
are attached, that paragraph may not be 100% serious. Seriously.
This link provides further information.
Callid Conia Pact - Petitions - Archive








This link provides further information.
Callid Conia Pact - Petitions - Archive
-
- Community Hero
Posts: 4200
Re: Let's get programmy!
to call a function while using its name as a string, look up Reflection. I can't tell you how the java syntax goes as I've ever only used C# reflection to call functions, so you're on your own there 
As for function pointers, those certainly do exist in C# and C++, but not in Java. If you want to emulate them, you'll have to do something like is discussed on this stackoverflow page, where you make a generic 1-function interface that has an "execute" command which you define elsewhere to do whatever it is you want.

As for function pointers, those certainly do exist in C# and C++, but not in Java. If you want to emulate them, you'll have to do something like is discussed on this stackoverflow page, where you make a generic 1-function interface that has an "execute" command which you define elsewhere to do whatever it is you want.
-
- Community Villain
Posts: 3588
- Callid
- Ratio vincit omnia.
Posts: 1433
Re: Let's get programmy!
Don't worry, I'd never write something like thatranger wrote: arrgg I hate your coding style Callid, hurts my eyes to read your if loops

After all, this is exactly why I'm asking XD
If
,
,
,
,
,
,
or
are attached, that paragraph may not be 100% serious. Seriously.
This link provides further information.
Callid Conia Pact - Petitions - Archive








This link provides further information.
Callid Conia Pact - Petitions - Archive