View unanswered posts | View active topics It is currently Fri Aug 07, 2020 12:12 am

Reply to topic  [ 2 posts ] 
Rounding in PIC 
Author Message

Joined: Tue Jan 08, 2013 6:08 pm
Posts: 4
Post Rounding in PIC
Hello, I would like to know if there is a way to round numbers using a PIC microcontroller. In Robotc when I am on the Cortex 2.0 platform type, there is a rounding function. When I switch to the P
IC 0.5 platform type, the function dissappears. I need to be able to round a number to the nearest integer.

Thank you in advance.

Mon Mar 11, 2013 4:05 pm
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 620
Post Re: Rounding in PIC
Because of memory limitations of the PIC, the ROBOTC VM on the PIC does not support Long and Float variables. The VEX Cortex does support Long and Float variable types.

With only Integer and smaller variable types available, the necessity for the "round" function doesn't exist on the PIC as there's nothing to round.

Timothy Friez
ROBOTC Developer - SW Engineer

Wed Mar 13, 2013 11:58 am
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.