Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C Question - printing varchar

Re: Pro*C Question - printing varchar

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Sat, 16 Oct 2004 01:55:16 +0100
Message-ID: <f9s0n09lugbbfjho3kjl3lhmpuciuj9f16@4ax.com>


On Thu, 14 Oct 2004 20:10:39 -0400, Kareem Nutt <methodmano_at_gmail.com> wrote:

>varchar name[21];
>... select statement puts value into name ...
>....
>name.arr[name.len] = '\0';
>printf ("name is %s.\n", name.arr);
>
>Example of what I get when I do this I get:
>"name is bob."
>
>What I want is to have all the extra spaces printed out as well:
>"name is bob."

 That's just a C question rather than Pro*C - maybe comp.lang.c would be better. Sounds like you want %20s, rather than %s.

-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Fri Oct 15 2004 - 19:55:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US