in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold?
so adress of what? 30 39467
iskeletor wrote:
in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold?
so adress of what?
It's a biggish [1] number, that's all.
[1] From the point of view of 32-bit machine integers in twos complement.
From any reasonable point of view, it's a peanut: not even 2pow32,
let alone (searches for a number) 10pow100.
--
Chris "electric hedgehog" Dollin
"It took a very long time, much longer than the most generous estimates."
- James White, /Sector General/
iskeletor wrote:
in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold?
so adress of what?
0xFFFFFFFF is a hexadecimal integer constant. Its decimal value is
simply 4294967295. As far as C is concerned, that does not mean
infinity. Applications, however, may choose to have it mean exactly
that, just as they may choose 2 to mean infinity.
I don't know if you know what hexadecimal means. If you don't, a quick
search gives me http://www.pcnineoneone.com/howto/hex1.html
as one possible introduction.
On Jan 24, 9:43 am, "iskeletor" <zirvedo...@gma il.comwrote:
in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what?
Nope. It isn't ASCII
or is it a address that a pointer hold?
so adress of what?
It is unlikely that it is a pointer
Technically
#define INFINITY 0xFFFFFFF
tells the compiler to replace the token INFINITY with the token
0xFFFFFFF whenever the compiler encounters it in the source code. The
context of the source code statement that uses this INFINITY /
0xFFFFFFF token will give you "what it is".
0xFFFFFFF is taken as an integer value
It /might/ be used as the initializer for a pointer
It /might/ be used as the initializer for an integer data item
It depends on the context
HTH
--
Lew
Or it's a small negative number, -1. It's only a big positive number (what
it is supposed to represent given the context) if the system/program uses
32-bit unsigned ints.
---Matthew Hicks
iskeletor wrote:
>in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold? so adress of what?
It's a biggish [1] number, that's all.
[1] From the point of view of 32-bit machine integers in twos
complement.
From any reasonable point of view, it's a peanut: not even 2pow32,
let alone (searches for a number) 10pow100.
Harald van Dijk wrote:
iskeletor wrote:
>in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold? so adress of what?
0xFFFFFFFF is a hexadecimal integer constant.
Nitpick: the OP's text said 0xFFFFFFF, not 0xFFFFFFFF.
(One difference is that on a 32-bit-int implementation,
the OP's text will become a signed int literal but
yours will become an /unsigned/ int literal. If I
remember correctly.)
--
Chris "integral hedgehog" Dollin
"Who are you? What do you want?" /Babylon 5/
In article <11************ *********@h3g20 00cwc.googlegro ups.com>,
Harald van Dijk <tr*****@gmail. comwrote:
>#define INFINITY 0xFFFFFFF
>0xFFFFFFFF is a hexadecimal integer constant. Its decimal value is simply 4294967295.
The number was 0xFFFFFFF, not 0xFFFFFFFF. The latter might be a bad
choice as a large number on many current machines, since it would be
-1 if stored in an int. INT_MAX would be more portable.
-- Richard
--
"Considerat ion shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Matthew Hicks wrote:
Please don't top-post. Thanks. Fixed.
>iskeletor wrote:
>>in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold? so adress of what?
It's a biggish [1] number, that's all.
[1] From the point of view of 32-bit machine integers in twos complement. From any reasonable point of view, it's a peanut: not even 2pow32, let alone (searches for a number) 10pow100.
Or it's a small negative number, -1. It's only a big positive number (what
it is supposed to represent given the context) if the system/program uses
32-bit unsigned ints.
Count Fs.
It's positive anyway: if the value /was/ 0xFFFFFFFF, then on a 32-bit
implementation it will be an unsigned int, not a signed int. IIRC.
--
Chris "electric hedgehog" Dollin
"- born in the lab under strict supervision -", - Magenta, /Genetesis/
Ignore my previous post as Mr. Tobin pointed out that there are only 7 hex
characters. On a side note, 0x7fffffff would probably be a better general
coice for infinity on most 32-bit machines.
---Matthew Hicks
Or it's a small negative number, -1. It's only a big positive number
(what it is supposed to represent given the context) if the
system/program uses 32-bit unsigned ints.
---Matthew Hicks
>iskeletor wrote:
>>in a program it is passing like that:
#define INFINITY 0xFFFFFFF
it is a ASCII code of what? or is it a address that a pointer hold? so adress of what?
It's a biggish [1] number, that's all.
[1] From the point of view of 32-bit machine integers in twos complement. From any reasonable point of view, it's a peanut: not even 2pow32, let alone (searches for a number) 10pow100.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: thecrow |
last post by:
Alright, what the hell is going on here?
In the following code, I expect the printed result to be:
DEBUG: frank's last name is burns.
Instead, what I get is:
DEBUG: frank's last name is burns.
Here is the code:
$frank = "burns";
|
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have any preconceived ideas about it. I have
noticed, however, that every programmer I talk to who's aware of Python is
also talking about Ruby. So it seems that Ruby has the potential to compete
with and displace Python. I'm curious on what basis it...
|
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro capabilities, unfortunately. I'd like to know if it may
be possible to add a powerful macro system to Python, while
keeping its amazing syntax, and if it could be possible to
add Pythonistic syntax to Lisp or Scheme, while keeping all
of the...
|
by: Reed L. O'Brien |
last post by:
I see rotor was removed for 2.4 and the docs say use an AES module
provided separately... Is there a standard module that works alike or
an AES module that works alike but with better encryption?
cheers,
reed
|
by: Philippe C. Martin |
last post by:
I apologize in advance for launching this post but I might get enlightment
somehow (PS: I am _very_ agnostic ;-).
- 1) I do not consider my intelligence/education above average
- 2) I am very pragmatic
- 3) I usually move forward when I get the gut feeling I am correct
- 4) Most likely because of 1), I usually do not manage to fully explain 3)
when it comes true.
- 5) I have developed for many years (>18) in many different environments,...
| |
by: Dario |
last post by:
The following simple program behaves differently
in Windows and Linux .
#include <stdexcept>
#include <iostream>
#include <string>
using namespace std;
class LogicError : public logic_error {
public:
string desc;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |