Jump to content
Sign in to follow this  
Guest zip

counterparts of ord and chr in C

Recommended Posts

Guest Eugen

Hi,I wonder what the corresponding functions are for ord and chr in CBrgdsEugen

Share this post


Link to post
Share on other sites
Guest zip

In C/C++, a character is a byte (or a word if you are setup to use Unicode). There is no distinction. Anyway, the code below should illustrate:char c = 'A'; // should be ascii 65int i = (int)c; // i = 65 = ord('A')char zero = '0';char one = (char)((int)zero + 1); // chr function = '1'There are also some Win32 API or some C runtime library functions for each, and they support unicode (double byte, or word sized, characters).That's why they use ADA to program the F16 flight control systems...

Share this post


Link to post
Share on other sites

ADA! You said the ADA word! I am melting, ADA, ADA, ADA!When working for the U.S. Navy, ADA was being pushed down our throats as the next language to be used for all Government projects. Most colleges didn't support teaching ADA.Since being retired for almost four years, I don't know were ADA stands but it seemed to be declining even before I retired.Now excuse me, I have to go brush my teeth to get the ADA strings out between my teeth. I am going to gargle also to kill the ADA bacteria. Now were did I put that Listerine, UGH!!!W. Sieffert

Share this post


Link to post
Share on other sites
Guest zip

ADA-boy? Cheech, no respect for the daughter of Lord Byron...I'm not sure I want to admit I worked on that compiler...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...