Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #5976

Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield"

From Stephen Heumann <stephen.heumann@gmail.com>
Newsgroups comp.sys.apple2.programmer
Subject Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield"
Date 2022-05-27 21:54 -0500
Organization A noiseless patient Spider
Message-ID <t6s2ta$2ng$1@dont-email.me> (permalink)
References (3 earlier) <48521c41-a6b6-4909-a514-96ef272db144n@googlegroups.com> <YuidnUhk0Z_IkQ3_nZ2dnUU7-c_NnZ2d@supernews.com> <a57d172d-76fa-4adc-969a-32ab0494aef5n@googlegroups.com> <d9309dd2-fe31-4f20-83f6-caaa60759eb3n@googlegroups.com> <5b1fcf59-ef7e-4e0f-95b1-89a38307936an@googlegroups.com>

Show all headers | View raw


On 2022-05-27 19:53:32 +0000, James Hall said:

> What keeps coming to mind is;   to me it seems the alignment issue is 
> being generated anytime there is a -Negative number!  Is it possible to 
> force orca/c to generate a +Positive sign in-front of all Positive 
> Values. Would this resolve it ?

You can force it to generate a + sign for positive numbers by including 
the "+" flag in the format specification, e.g. "%+.9f".  That should 
cause numbers with a magnitude less than 10 to line up when printed.

If you will be dealing with a wider range of magnitudes, you will need 
to figure out what part(s) of the numbers you want lined up, since they 
would have different numbers of digits before the decimal point.  One 
possibility is to specify that the numbers should be padded with zeros 
up to a certain field width, which you can do by including the "0" flag 
and an explicit field width in the format specification, e.g. 
"%+015.9f".  (Very large numbers still won't line up if they have too 
many digits before the decimal point, so you will need to pick a field 
width that accommodates numbers within the range you intend to use.)

-- 
Stephen Heumann

Back to comp.sys.apple2.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" James Hall <james.hall.ottawa@gmail.com> - 2022-05-25 10:40 -0700
  Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" cruff@ruffspot.net (Craig Ruff) - 2022-05-25 18:52 -0500
    Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" James Hall <james.hall.ottawa@gmail.com> - 2022-05-25 18:33 -0700
      Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" "tsma...@gmail.com" <tsmaster@gmail.com> - 2022-05-26 09:20 -0700
        Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" cruff@ruffspot.net (Craig Ruff) - 2022-05-26 18:25 -0500
          Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" James Hall <james.hall.ottawa@gmail.com> - 2022-05-26 23:17 -0700
            Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" cruff@ruffspot.net (Craig Ruff) - 2022-05-27 07:19 -0500
            Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" "tsma...@gmail.com" <tsmaster@gmail.com> - 2022-05-27 08:18 -0700
              Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" James Hall <james.hall.ottawa@gmail.com> - 2022-05-27 12:53 -0700
                Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" Stephen Heumann <stephen.heumann@gmail.com> - 2022-05-27 21:54 -0500
                Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" James Hall <james.hall.ottawa@gmail.com> - 2022-05-28 00:02 -0700
      Re: I am working on a orca/c project and need "Learn to Program in C by Mike Westerfield" Stephen Heumann <stephen.heumann@gmail.com> - 2022-05-26 17:57 -0500

csiph-web