Home | Gallery | Forum | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com Forum
OS2 World.Com Online Discussion Forum.
Index / OS/2 - General / Programming
author message
Calling the DosSleep function.
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
sleepy
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 3
since: 30 Sep, 2002
1. Calling the DosSleep function.
Reply to this topic with quote Modify your message
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.

Date: 30 Sep, 2002 on 11:13
Brennor
Normal member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 9
since: 30 Sep, 2002
2. Re:Calling the DosSleep function.
Reply to this topic with quote Modify your message

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
Date: 11 Oct, 2002 on 17:36
Calling the DosSleep function.
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
All times are CET+1. < Prev. | P. 1 | Next >
Go to:
 

Powered by UltraBoard 2000 Standard Edition,
Copyright © UltraScripts.com, Inc. 1999-2000.
Home | Gallery | Forums | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com 2000-2004