OS2 World.Com Forum

Subject  :  Calling the DosSleep function.
Author  :  sleepy
Date  :  30 Sep, 2002 on 11:13
I'm debugging a complex software programm written in C for the os2 platform. Sometimes the developer calls the dosSleep function with an integer as parameter like: DosSleep(2000) and sometimes with an integer but ending with the "L" like: DosSleep(2000L). You must know that the application ist multithread and using semaphore technology.

The question is: Can you tell me the difference between DosSleep(2000L) and DosSleep(2000)?

Thank you.
Best regards.


Subject  :  Re:Calling the DosSleep function.
Author  :  Brennor rpufky1@rochester.rr.com
Date  :  11 Oct, 2002 on 17:36

sleepy (Sep 30, 2002 13:13):
The question is: Can you tell me the difference between DosSleep(2000L) and DosSleep(2000)?

Yeah, the 'L' signifies that the value is a long. This is useful for making long integers where the value is less than the regular integer max (so that you don't have to implicitly cast things back and forth).
Shouldn't make a big difference with the DosSleep code though. It should still work. It normally takes in a long. Without the 'L', the compiler does an implicit conversion from an int to a long. For the version with the 'L', the compiler doesn't have to do that conversion.

HTH.


Check out the pictures of my baby girl!
http://brennor.dyndns.org/Daphne

Powered by UltraBoard 2000 <www.ub2k.com>