Lee Mac Posted December 20, 2008 Share Posted December 20, 2008 Hi Guys, Hope everyone is having a nice Christmas so far. Was just playing around with some LISP, and wondered why there was an irregularity in the way the LISP functions are named, for example: itoa --->> i-to-a --->> integer to string atoi --->> a-to-i --->> string to integer This would seem to imply that: i = integer (obvious enough) a = string (not so obvious, but OK...) It follows: atof --->> a-to-f --->> string to real This is also logical, as we have already assumed: a = string Now we would assume: f = real (again, not so obvious, but what the heck... ) So, why is it that, when we get to "Real to String" we have: rtos --->> r-to-s --->> real to string This seem pretty irregular, so I though I'd have a discussion about it, and maybe there are other irregularities that others have found and want to discuss. Quote Link to comment Share on other sites More sharing options...
dbroada Posted December 20, 2008 Share Posted December 20, 2008 a = string (not so obvious, but OK...) a = alpha? as to why for the rest, no eyed deer Quote Link to comment Share on other sites More sharing options...
David Bethel Posted December 20, 2008 Share Posted December 20, 2008 Lee, Most used to think that the a is to mean ASCII atoi ASCII to integer atof ASCII to float itoa integer to ASCII They relate to the (ascii) and (float) calls in AutoLISP. -David Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2008 Author Share Posted December 20, 2008 Lee, Most used to think that the a is to mean ASCII atoi ASCII to integer atof ASCII to float itoa integer to ASCII They relate to the (ascii) and (float) calls in AutoLISP. -David Ahhhh, good point, this would make sense. Thanks for clarifying that. But in that case, why use rtos and not something like: ftoa Quote Link to comment Share on other sites More sharing options...
David Bethel Posted December 20, 2008 Share Posted December 20, 2008 Lee, Probably due to the terms REAL vs INT as used to store values in 'puter languages. (float) converts 'INTs into 'REALs -David Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2008 Author Share Posted December 20, 2008 Ahh, thanks. You're cleverer than you look Quote Link to comment Share on other sites More sharing options...
SEANT Posted December 20, 2008 Share Posted December 20, 2008 Another conspicuous irregularity is with polylines. The word “Polyline” can identify, or excluded, any of the three poly types, L(ight)W(eight)Polyline, 2DPolyline, 3DPolyline depending on the context – Lisp, VBA, Quick Select, DXF Reference and Filter Command. The Filter command (which utilizes the DXF Reference - so behave similarly) also includes Polygon Mesh and PolyFace Mesh under the “Polyline” designation. Keeps us on our toes, I guess. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 20, 2008 Author Share Posted December 20, 2008 Keeps us on our toes, I guess. I think you're onto something here.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.