| |||||||||||
| |||||||||||
Functions and commands with dangerous names
There are some words that we use in our day to day programming life that seem a little scarey and inappropriate to their real task ... and sometimes those words worry trainees on our courses. Examples:
PHP's reset function. It's name seems to threaten to clear our data from somewhere, but all it does is reset a pointer so that following calls to iterators such as each start at the beginning. global declarations in Tcl and PHP. They seem to imply that a variable is going to be seen everywhere; all they really mean is that a variable in the current procedure or function is shared with the main code (the code not within any procedure or function) of the current application. And the grandaddy of them all - Unix and Linux's kill command. I'm happy to report that killing is not necessarily fatal, as all it does is send a signal to a specified process. If that process has been written in such a way that it exits, then (yes) it dies ... but if it's been written to perform in another way when it gets an external signal, that's what it does. (written 2005-08-11 08:52:46) Associated topics are indexed under H106 - PHP - ArraysH105 - PHP - Functions T207 - Tcl/Tk - Procedures and Variable Scope A161 - Web Application Deployment - Users and Groups
Some other Articles
Save the trainBristol Balloon Festival Javascript examples (some PHP and MySQL too) Reading a news or blog feed (RSS) in your PHP page Functions and commands with dangerous names Can an older person learn a programming language Theft of training material Assignment, equality and identity in PHP Horse's Mouth is a year old How to check that a string contains a number in Tcl 1638 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||