[Bf-committers] Blender.Image Question

Austin Benesh doccoaster at msn.com
Sun Feb 20 03:46:22 CET 2005


Sorry - I learned output using the "cout <<" method.

-----Original Message-----
From: bf-committers-bounces at projects.blender.org
[mailto:bf-committers-bounces at projects.blender.org] On Behalf Of Robert
Wenzlaff (AB8TD)
Sent: Saturday, February 19, 2005 6:12 PM
To: bf-blender developers
Subject: Re: [Bf-committers] Blender.Image Question

On Saturday 19 February 2005 16:16, Alexander Ewering wrote:
> From the manpage of printf() you've probably read:
>
>         %p      The void * pointer argument is printed in hexadecimal (as
> if by %#x or %#lx).
>
> To print the content of memory locations, you need to dereference the
> pointer.

Not to mention the fact that you are telling it to format the data as a 
pointer and then give it no data.  So it fills the format with garbage.

The part in the " "s are format codes, it should be followed by a list of
data 
items to fill into the format codes.  IE; 

int k=3; 
printf("My int k = %i", k); 

will print "My int k = 3". %i is int, %f is float, %x is hex,  %p is pointer

(and %% is a "%" sign).   If you give it a float, and tell it to format it
as 
an int, you'll get a different kind of garbage.  C doesn't type check.  
That's the C programmer's job.  What do you get for this pendantic
behaviour?  
A minimum number of machine instructions per line of code.

Not to be rude (that's inttr's job) but this stuff is day 2 of a C
programming 
class.
-- 
**********************************************
Robert Wenzlaff    rwenzlaff at soylent-green.com

_______________________________________________
Bf-committers mailing list
Bf-committers at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list