1. Maybe I'm just missing it... - Reply

James A Bearden wrote:

> I recently decided to translate a BASIC program that I was using to make
> randomized modifications to one of my Windows ini files.  The problem is
> that I need to create a random number, and turn it into a string.

Try    s = sprint("%d", rand(19))     Jiri

new topic     » topic index » view message » categorize

2. Re: Maybe I'm just missing it... - Reply

BABOR, JIRI wrote:

> James A Bearden wrote:
>
> > I recently decided to translate a BASIC program that I was using to make
> > randomized modifications to one of my Windows ini files.  The problem is
> > that I need to create a random number, and turn it into a string.
>
> Try    s = sprint("%d", rand(19))     Jiri


That should be:
        s = sprintf("%d", rand(19))

--Augorian;

new topic     » goto parent     » topic index » view message » categorize

3. Re: Maybe I'm just missing it... - Reply

Thanks.  I was thinking of sprintf() as a procedure, rather than a
function, so I didn't think to look at it.  I'm thinking about setting up
a list of commands, grouped by function and procedure.  Maybe that might
make a good suggestion for the docs in the next version.  I'm sure I'm
not the only one who gets confused now and then.

Jim Bearden
(J-Solo at juno.com)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu