Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: Question on finding the number of defined array elements.
Chris Erskine
One of the things that I would do with pointers was for strings with delimiters, you would null out the delimiter and by using pointers, you could point to the start of the string without having to copy the data into new fields. There are a number of other uses that they can be used for but that was the one I was thinking about when Joseph talked about breaking up the XML files.
toggle quoted message
Show quoted text
Chris -----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of Lincoln King-Cliby Sent: Friday, January 23, 2009 4:08 PM To: 'Crestron@...' Subject: RE: [Crestron] Re: Question on finding the number of defined array elements. Isn't' that why you pass strings by reference unless you have a good reason for passing them by value (or you're dealing with one of the S+ quirks that won't allow a passing byref, like IIRC, a serial input)? Or would pointers open up another advantageous option that I'm forgetting at the moment (it's been far too long since the last time I played with a language the formally supported pointers :(... but they are uber cool. Took me most of my first semester of AP CompSci in high school to figure the point out, but after that... wow!) Lincoln -- Lincoln King-Cliby, CTS Applications Engineer ControlWorks Consulting, LLC V: 440.729.4640 x1107 F: 440.729.0884 I: Crestron Authorized Independent Programmer -----Original Message----- From: Crestron@... [mailto:Crestron@...] On Behalf Of Chris Erskine Sent: Friday, January 23, 2009 11:12 AM To: Crestron@... Subject: RE: [Crestron] Re: Question on finding the number of defined array elements. I agree that not only would your code be more compact but more efficient since you would not have to be copying data around all over. On the other hand, pointers would cause so much more problems in the code that systems would be crashing all over. Crestron would require better TB personnel and better tools since you would need a debugger that would let you step through the S+ code when it was running. Chris -----Original Message----- From: Crestron@... [mailto:Crestron@...] On Behalf Of Joseph K. Vossen Sent: Friday, January 23, 2009 9:06 AM To: Crestron@... Subject: Re: [Crestron] Re: Question on finding the number of defined array elements. agreed...in my non-Crestron circle of travels in the past, I have found that a *good* understanding of pointers separates the good programmers from the great ones. And then when you jump into function pointers, that opens up a whole new world of fun..... having pointers in SIMPL+ would benefit, for example, those tasks that perform a *lot* of parsing, such as busting up XML pages. Sure one can do it now with what is available, I just think the code would be a bit more compact, IMHO -----Original Message----- From: fooguy89 <fooguy89@...> ------------------------------------ Check out the Files area for useful modules, documents, and drivers. A contact list of Crestron dealers and programmers can be found in the Database area. Yahoo! Groups Links ------------------------------------ Check out the Files area for useful modules, documents, and drivers. A contact list of Crestron dealers and programmers can be found in the Database area. Yahoo! Groups Links ------------------------------------ Check out the Files area for useful modules, documents, and drivers. A contact list of Crestron dealers and programmers can be found in the Database area. Yahoo! Groups Links |
to navigate to use esc to dismiss