Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Hex to Dec and Bin to Dec with functions
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
joe333




PostPosted: Tue Apr 13, 2004 2:55 pm   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
joe333




PostPosted: Tue Apr 13, 2004 3:07 pm   Post subject: (No subject)

I am now also stuck with the hex to dec. lol
Raugrist




PostPosted: Tue Apr 13, 2004 3:11 pm   Post subject: (No subject)

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




PostPosted: Tue Apr 13, 2004 3:22 pm   Post subject: (No subject)

I put in my post above that I am not allowed to use those.
Raugrist




PostPosted: Tue Apr 13, 2004 3:24 pm   Post subject: (No subject)

Oh, sorry.
Delos




PostPosted: Tue Apr 13, 2004 4:23 pm   Post subject: (No subject)

Quote:

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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: