![]() |
![]() |
#41 | |
Join Date: Jul 2007
Location: Ann Arbor, MI
|
![]() Quote:
Is there a reason that you're using codepad.org instead of one of the free compilers for your platform? I doubt that codepad.org is capable of using the code I provided. It lacks provisions for command line parameters and for libraries besides libc. It needs libm.
__________________
Online Campaign Planning |
|
![]() |
![]() |
![]() |
#42 | |
Computer Scientist
Join Date: Aug 2004
Location: Dallas, Texas
|
![]() Quote:
And codepad.org still has some new shinny left on it for me, or had before the apparent omission of some math functionality was revealed. :( |
|
![]() |
![]() |
![]() |
#43 |
Join Date: Feb 2006
Location: Krotz Springs, LA US
|
![]()
Unless I've missed something at codepad.org, the inability to link against the standard libraries isn't the only problem—although, that's a doozy. Say someone did write you a version which replaced pow()—and yes, that's easy enough to do—how do you interact with the program at codepad.org? I haven't dug into every nook and cranny, but I haven't noticed any way to provide input to a program. For powerstone.c, you'd always be looking at its usage message, and that's not terribly useful.
__________________
Thomas M. EDWARDS <tmedwards@motoslave.net> GCA4 resources: GCA Repository, Phoenix (r66), GMCS (2.17), Bookish (r12) |
![]() |
![]() |
![]() |
#44 |
Dog of Lysdexics
Join Date: Oct 2004
Location: Melbourne FL, Formerly Wellington NZ
|
![]()
Well this thread has inspired me to finally build my GURPS Enchantment Calculator
|
![]() |
![]() |
![]() |
#45 |
Join Date: Aug 2007
Location: Vermont, USA
|
![]()
Bah. Why am I using google when I've got javascript? This version doesn't require an internet connection, just any javascript-capable browser:
Code:
javascript:c=prompt('Powerstone%20Capacity:','');if(/\d+/.test(c)){(10*c*c+40*c)*Math.pow(54/53,c)+20*c}else{null}; |
![]() |
![]() |
![]() |
#46 |
Dog of Lysdexics
Join Date: Oct 2004
Location: Melbourne FL, Formerly Wellington NZ
|
![]()
I plug that into Chrome, it produced the prompt, but not the results.
|
![]() |
![]() |
![]() |
#47 |
Join Date: Feb 2005
Location: Berkeley, CA
|
![]()
You can also just use a scientific calculator. Anyway, here is a google docs spreadsheet that calculates most of the stuff you want to know (you'll have to copy it; I didn't turn on edit access). Note that the price listed is per the formula in Magic, which is not quite correct, but the correct formula is messy to calculate and not different enough to really matter.
Last edited by Anthony; 03-14-2011 at 12:07 AM. |
![]() |
![]() |
![]() |
#48 | |
Join Date: Aug 2007
Location: Vermont, USA
|
![]() Quote:
Code:
javascript:c=prompt('Powerstone%20Capacity:','');if(/\d+/.test(c)){d=document.open();d.write((10*c*c+40*c)*Math.pow(54/53,c)+20*c);d.close();}else{null}; Last edited by munin; 03-14-2011 at 12:25 AM. |
|
![]() |
![]() |
![]() |
#49 |
Join Date: Jul 2007
Location: Ann Arbor, MI
|
![]()
There's nothing platform specific about the source code I provided. For that matter, the windows binary I provided uses Qt, which means it can be rebuilt to provide a GUI for most common operating systems, including iPhone and Android.
__________________
Online Campaign Planning |
![]() |
![]() |
![]() |
#50 |
Computer Scientist
Join Date: Aug 2004
Location: Dallas, Texas
|
![]()
When you wrote "windows version" earlier, I was mistaken about exactly which item it referred to.
|
![]() |
![]() |
![]() |
Tags |
generator, gurps, powerstone, powerstones, program |
Thread Tools | |
Display Modes | |
|
|