Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ultoa(DOS) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought

     Name
          ultoa - Converts an unsigned long integer to a string.

     Syntax
          #include <stdlib.h>

          char *ultoa(value, string, radix)
          unsigned long value;
          char *string;
          int radix;

     Description
          The ultoa function converts the digits of value to a null-
          terminated character string and stores the result (up to 33
          bytes) in string. No overflow checking is performed. The
          radix argument specifies the base of value; it must be in
          the range 2 - 36.

     Return Value
          The ultoa function returns a pointer to string. There is no
          error return.

     See Also
          itoa(DOS), ltoa(DOS)

     Example
          #include <stdlib.h>

          int radix = 16; char buffer[40]; char *p;

          main()
           {
                  /* p = "501d9138" */
                  p = ultoa(1344115000L,buffer,radix);
                  printf("buffer= \"s\"\n", buffer);
           }

          This program converts the long integer 1,344,115,000 to a
          string and displays that string.

                                                (printed 6/18/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026