473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

info su funzione

Ho una funzione definita così:

#define CEIL(num,den) ( ((num)+(den)-1)/(den) )

e l'uso è questo;
int len;
len = CEIL(L, step);

la CEIL però difficilmente mi restituisce un numero intero anche se lo sono
num e den, come fa quindi len ad essere un int senza usare il casting?

Grazie
michele
Nov 14 '05 #1
1 1603
Sorry, wrong newsgroup....

michele
"Michele" <mi********@libero.togli_i_k.it> ha scritto nel messaggio
news:c5**********@newsread.albacom.net...
Ho una funzione definita così:

#define CEIL(num,den) ( ((num)+(den)-1)/(den) )

e l'uso è questo;
int len;
len = CEIL(L, step);

la CEIL però difficilmente mi restituisce un numero intero anche se lo sono num e den, come fa quindi len ad essere un int senza usare il casting?

Grazie
michele

Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: ivan_oj28 | last post by:
Hi, I am developing an application where I need to read the caller id from an incoming call. The only info (for now) I need is the caller id info, so that I can display the propper caller info on...
10
by: Frank | last post by:
Using Python 2.2.2, I want to catch all exceptions from "socket.gethostbyaddr(ip)" From IDLE, I can generate: >>> socket.gethostbyaddr('1.2') Traceback (most recent call last): File...
0
by: Michele | last post by:
Ho una funzione definita così: #define CEIL(num,den) ( ((num)+(den)-1)/(den) ) e l'uso è questo; int len; len = CEIL(L, step); la CEIL però difficilmente mi restituisce un numero intero...
10
by: pozz | last post by:
Ciao a tutti, in alcuni casi le funzioni in C sono così semplici che è meglio definirle come delle macro. Per evitare che l'utilizzatore si accorga di usare una macro o una funzione, avevo...
5
by: Lloyd Dupont | last post by:
I'm trying to print some of my document. The problem is, the rendering of the document is not done through GDI+ at all but through plain old GDI, and I need it like that as I am using Uniscribe to...
1
by: Mr. B | last post by:
VB.net 2003 c/w Framework 1.1 and MS Access db We have a commercial program that does our Acounting and Time Sheets (Timberline). At least once a day our Accounting department runs a Script...
0
by: jokerman | last post by:
I want to grab the amount of images in each <subnumber> section. How? I have this code in Flash; var pArray = new Array(); var tArray = new Array(); var myXML:XML = new XML();...
1
by: oddbande | last post by:
We have just upgraded a test enviroment to db2 9, and have set both the notifylevel and diaglevel to 3. But even so I get a lot of these messages in my db2diag.log: ...
1
by: michele.binetti | last post by:
Ciao a tutti, accedendo, per la prima volta, ad una pagina contenuta in un iframe non ho problemi. se riaccedo alla stessa, per la seconda volta, Internet Explorer mi da questa segnalazione:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.