Go to Post 2011. Tried swerve. Didn't move for 1.5 regionals. - cadandcookies [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 15-05-2009, 13:43
Chris27's Avatar
Chris27 Chris27 is offline
Registered User
AKA: Chris Freeman
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Mountain View
Posts: 196
Chris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant futureChris27 has a brilliant future
Re: **FIRST EMAIL**/Java and Orbit Balls

Quote:
Originally Posted by The Lucas View Post
Pointer arithmetic. It can be useful if used properly. However, I wouldn't encourage students new to C++ to use pointer arithmetic on the robot, unless of course, you want them to experience the frustration of the dreaded "Seg Fault".
Code:
char *ptr = malloc(SIZE);
ptr + i is equivalent to &ptr[i]. Both cases boil down to just a load effective address instruction. Besides the obvious that Java hides the virtual address of all values in the symbol table, I don't see how you are missing anything by not being able to explicitly use pointer arithmetic. The point of pointer arithmetic is to compute the address of an element in an array. the "[]" operator retrieves that element and many people find this interface more intuitive. There is no performance advantage of using pointer arithmetic and there is nothing you can't do with the "[]" that you can do with pointer arithmetic (as the "[]" operator just encapsulates pointer arithmetic).
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
**FIRST EMAIL**/Java and Orbit Balls *****Orbit Ball Discussion**** Pjohn1959 FIRST E-Mail Blast Archive 44 18-05-2009 20:19
"Java, Sun SPOT and the FIRST Robotics Competition" pogenwurst Programming 54 02-05-2009 23:37
Amazing Circuit Build and Simulation Java Applet Chris_Elston Electrical 2 26-06-2008 19:36
Eclipse Plugin, Linux, and a Java Loader shtylman Programming 5 17-01-2008 14:44
Learn C, C++, and Java with new board game. Elgin Clock Programming 8 04-11-2005 13:28


All times are GMT -5. The time now is 09:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi