[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Questions about simpleBatchBug3
From: |
Paul E. Johnson |
Subject: |
Re: [Swarm-Support] Questions about simpleBatchBug3 |
Date: |
Sun, 17 Aug 2003 11:01:07 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 |
I'm delighted you found that new tutorial module. I've not heard any
feedback about it.
Clements wrote:
First:
I'm converting createTimeString from the tutorial's simpleBatchBug3
Output.m file to a usableform for a project I am working on and came to
wonder why timeString is 100 chars long? According to the man page for
ctime it returns a 26 character set, while a %4d sprintf shouldn't go over
that boundary either (I can represent a pretty big number with 25 base-10
characters). A much smaller number or even a variable array could be used
without incident?
Yes, I think so.
Is it just set that large for safety reasons, formatting reasons, or is
there something fundamental I'm missing???
It was set there at random by me because I wanted to be absolutely sure
I had a big enough array to hold what got returned on any system.
I'm just doing things that work, and I hope you guys who actually know
about computers will clean up after me. :)
Secondary question:
Do we have to worry about a character being ':' or ' ' or '\n' in the
snprintf of the run number?
I think neither of those should be in the run file name, if that is what
you mean.
Tertiary question:
The code in createTimeString iterates through all 100 items in the array.
Is there a reason to continue after setting a \n to a \0 in the string?
I don't know! I see your point that the \0 should be seen as a string
terminator, but I don't know why you wouldn't just go ahead and clean up
the whole thing anyway. Unless you are doing this thing a million times
or something, it seems to me there is no reason to worry about it. But,
as you can see from my code and from my confession above, String
manipulation is the most annoying part of C for me and I'll gladly
accept any proposed changes you want to make in simpleBatchBug3 after
you get your new thingie worked out.
Thanks for any help on clarifying these.
Sincerely,
David
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
- [Swarm-Support] gcj - swarm - exe, Suman Kanuganti, 2003/08/15
- Re: [Swarm-Support] gcj - swarm - exe, Paul E. Johnson, 2003/08/15
- Re: [Swarm-Support] gcj - swarm - exe, Suman Kanuganti, 2003/08/15
- Re: [Swarm-Support] gcj - swarm - exe, Suman Kanuganti, 2003/08/15
- Re: [Swarm-Support] gcj - swarm - exe, Paul E. Johnson, 2003/08/15
- Re: [Swarm-Support] gcj - swarm - exe, Suman Kanuganti, 2003/08/16
- [Swarm-Support] Questions about simpleBatchBug3, Clements, 2003/08/17
- Re: [Swarm-Support] Questions about simpleBatchBug3,
Paul E. Johnson <=
- Re: [Swarm-Support] Questions about simpleBatchBug3, Clements, 2003/08/17