473,404 Members | 2,137 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,404 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 1602
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
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.