News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Help with an array

Started by sabernal, June 03, 2013, 08:37:14 AM

Previous topic - Next topic

sabernal

Hi, I'm new to masm32 and I'm trying to develop a program where at one point I have to turn a number I receive from the user into decimal, the user also tells me in what base the number he entered is in, its pretty simple. What I had in mind was to get the number received from the user and save it in an array digit by digit so I can then operate each digit, the problem I'm having is I'm not quite sure how to do that in masm32, any help or tips would be greatly appreciated.

dedndave

what base will he use to enter the base ???   :badgrin:

anyways, there are a couple MSVCRT functions that may help, _i64toa and _strtoui64

i have never used that last one   :P

http://msdn.microsoft.com/en-US/library/yakksftt%28v=vs.80%29.aspx
http://msdn.microsoft.com/en-us/library/85zk715d%28v=vs.80%29.aspx

here is some discussion...
http://www.autohotkey.com/board/topic/18670-converting-numbers-to-any-base-radix-using-msvcrtdll/


dedndave

if you want to roll your own, you could use Ling Long Kai Fang (Horner's Rule)   :P

http://masm32.com/board/index.php?topic=1932.msg20259#msg20259

sabernal

Ok thanks, Ill check that out

Gunther

Hi sabernal,

Quote from: sabernal on June 04, 2013, 08:25:41 AM
Ok thanks, Ill check that out

yes of course and welcome to the forum.

Gunther
You have to know the facts before you can distort them.