Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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, updated 2006-06-05)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
T207 - Tcl/Tk - Procedures and Variable Scope
  [96] Variable Scope - (2004-10-22)
  [122] Passing arrays to procs in Tcl - (2004-11-18)
  [308] Call by name v call by value - (2005-05-11)
  [775] Do not duplicate your code - (2006-06-23)
  [1163] A better alternative to cutting and pasting code - (2007-04-26)
  [1404] Tcl - global, upvar and uplevel. - (2007-10-24)
  [1782] Calling procs in Tcl and how it compares to Perl - (2008-09-02)
  [2466] Tcl - passing arrays and strings in and back out of procs - (2009-10-22)
  [2476] Tcl - uplevel to run code at calling level - (2009-10-24)
  [2520] Global and Enable - two misused words! - (2009-11-30)
  [2929] Passing a variable number of parameters in to a function / method - (2010-08-20)
  [3192] Tcl - Some example of HOW TO in handling data files and formats - (2011-03-04)
  [3414] Passing back multiple results in Tcl - upvar and uplevel - (2011-09-01)
  [3629] Sharing lots of values in Tcl without having lots of global declarations - (2012-02-28)
  [4398] Accessing variables across subroutine boundaries - Perl, Python, Java and Tcl - (2015-01-18)

H106 - PHP - Arrays
  [603] PHP - setting sort order with an associative array - (2006-02-13)
  [773] Breaking bread - (2006-06-22)
  [832] Displaying data at 5 items per line on a web page - (2006-08-14)
  [1116] PHP adding arrays / summing arrays - (2007-03-23)
  [1199] Testing for one of a list of values. - (2007-05-22)
  [1451] More PHP sample and demonstration programs - (2007-12-01)
  [1614] When an array is not an array - (2008-04-17)
  [2215] If nothing, make it nothing. - (2009-06-02)
  [2274] PHP preg functions - examples and comparision - (2009-07-08)
  [2915] Looking up a value by key - associative arrays / Hashes / Dictionaries - (2010-08-11)
  [2920] Sorting - naturally, or into a different order - (2010-08-14)
  [3004] Increment operators for counting - Perl, PHP, C and others - (2010-10-18)
  [3379] Sorting data the way YOU want it sorted - (2011-08-05)
  [3534] Learning to program in PHP - Regular Expression and Associative Array examples - (2011-12-01)
  [4068] Arrays in PHP - contain different and even mixed data types - (2013-04-24)
  [4072] Splitting the difference with PHP - (2013-04-27)
  [4244] Disambiguation - PHP List - (2014-03-07)

H105 - PHP - Functions
  [223] There is a function in PHP to do that - (2005-02-21)
  [339] Passing information into and out of PHP functions - (2005-06-07)
  [340] Code and code maintainance efficiency - (2005-06-08)
  [421] Don't repeat code - use loops or functions - (2005-08-21)
  [866] A lazy programmer is a good programmer - (2006-09-15)
  [936] Global, Superglobal, Session variables - scope and persistance in PHP - (2006-11-21)
  [1021] PHP - static declaration - (2007-01-04)
  [1202] Returning multiple values from a function (Perl, PHP, Python) - (2007-05-24)
  [1267] is there a lookup function in php? - (2007-07-15)
  [1357] Clean my plate, but keep my wine bottle. (PHP; Static) - (2007-09-18)
  [1380] Static variables in PHP - (2007-10-05)
  [1784] Global - Tcl, PHP, Python - (2008-09-03)
  [2488] A variable number of arguments in a PHP function - (2009-11-02)
  [2630] Static variables and ampersands in PHP - (2010-02-10)
  [2682] Adding extensions to PHP Open Source applications - callbacks - (2010-03-17)
  [2737] Improving your function calls (APIs) - General and PHP - (2010-04-24)
  [3026] Coding efficiency - do not repeat yourself! - (2010-11-02)

A161 - Web Application Deployment - Users and Groups
  [431] File permissions of Linux and Unix systems - (2005-08-31)
  [683] Supporting users on Linux and Unix - (2006-04-13)
  [1592] Setting up a new user - Linux or Unix - (2008-03-26)
  [1619] User and Group settings for Apache httpd web server - (2008-04-22)
  [1650] Looking for files with certain characteristics (Linux / Unix) - (2008-05-22)
  [1773] The Longest Possible Day - (2008-08-26)
  [1902] sstrwxrwxrwx - Unix and Linux file permissions - (2008-11-23)
  [1904] Ruby, Perl, Linux, MySQL - some training notes - (2008-11-23)
  [2103] Ask the Tutor - Open Source forum - (2009-03-25)
  [2117] Choosing a railway station fairly in PHP - (2009-04-04)
  [2203] Always use su with minus. And where do programs come from? - (2009-05-27)
  [2301] Mistaken identity? - (2009-07-22)
  [2491] Root is root for a reason! - (2009-11-03)
  [2639] su or su - ... what is the difference? - (2010-02-17)
  [4045] Linux Web Server - User Roles, User Accounts, and shared administration - (2013-03-16)


Back to
Can an older person learn a programming language
Previous and next
or
Horse's mouth home
Forward to
Reading a news or blog feed (RSS) in your PHP page
Some other Articles
Save the train
Bristol 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
4759 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, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This 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).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.info/mouth/409_Func ... names.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb