
-----------------------------------
joe333
Tue Apr 13, 2004 2:55 pm

Hex to Dec and Bin to Dec with functions
-----------------------------------
I am new at this but i am learning lol, I have to make these two SEPARTE programs, I have bin to dec done but i don't know how to turn it into a function. Any help? I searched but the one that I found I didn''t understand. I am also not allowed to use the "strint" way

-----------------------------------
joe333
Tue Apr 13, 2004 3:07 pm


-----------------------------------
I am now also stuck with the hex to dec. lol

-----------------------------------
Raugrist
Tue Apr 13, 2004 3:11 pm


-----------------------------------
Use intstr() or strint(). I haven't used those for base conversion in a while so my memory of them is fuzzy, and I'm on Linux right now so I can't check. But if you type intstr and press F9 it should show you how to use it to convert numbers while specifying a base. Type strint and press F9 as well just to make sure.

-----------------------------------
joe333
Tue Apr 13, 2004 3:22 pm


-----------------------------------
I put in my post above that I am not allowed to use those.

-----------------------------------
Raugrist
Tue Apr 13, 2004 3:24 pm


-----------------------------------
Oh, sorry.

-----------------------------------
Delos
Tue Apr 13, 2004 4:23 pm


-----------------------------------

Look here (I used the "Search" button...amazing...) 

http://www.compsci.ca/v2/viewtopic.php?t=3245


That is a post of mine from another thread...in this forum.

Anyhow, without using strint etc you'll need to develop your own character detection using index.


index (stringToBeAnalysed, searchStringPattern"


There's a hundred examples around the site.
