Typically, functions / named blocks of code take a series of operands / parameters as inputs, and return a result which is saved into another variable - here's an example in Perl:
$size = length($persname);
Incoming value - read from $persname
Action defined in - length
Outgoing value ....
Java 7 (or Java 1.7, if you prefer that name) was launched last summer, with new / improved features including:
* switch on a String object
* try with resources allowing easier cleanup / reducing memory leak potential
* catch allowing multiple exceptions in the same block to avoid need to repair co ....
Expect adds extra commands on top of Tcl - allowing the Tcl programmer to control additional processes as is they were really being run from the command line. But because they're being run from within a program, a whole lot of commands can be run with little effort, responses analysed easily, with ....
Tcl offers you three different loop commands - here they are generating the same output:
while A condition is tested, and if true the commands in a loop are performed. The condition is then retested (provided that you have passed the test into while as a deferred block)
set month 1
&n ....
What could possibly go wrong when you open a file in a program? Lots of things, actually.
* You could try to open a file in directory you cannot access
* You could try to read from a file that does not exist
* You could try to read from something that's not a plain file - e.g. a directory
* You c ....
2012 has started with a lot of different weather - or perhaps every year does, but we've been out and about much more with two dogs rather than one, and with a Learning to Program in Tcl course running for delegates who are new to the UK, and wanted to look around (and I'm happy to show them!) at lu ....
Someone tells you a website to visit - "go to wellhousemanor.co.uk" they say. And you'll naturally add "www." in front of it, calling up www.wellhousemanor.co.uk rather than wellhousemanor.co.uk ... or perhaps you won't.
Web servers are normally set up by default to respond to a single specific ho ....
First outing of the year:
01:30 on 1st January, to let hotel guests back into their room. They're embarrassed about calling me out as ever. "If I wasn't happy being on call, I wouldn't do the job" says I.
First program of the year:
perl -n -a -e '$ss+=$F[1];END{print "$ss\n"}' mh
Summing the n ....
These are my own thoughts on an appropriate response to the Greater Western Franchise Consultation from the Department for Transport, as it should relate to services running across Wiltshire on the TransWilts line, and the consequences thereof.
I have already posted a short analysis of what the pro ....
The Department for Transport is currently consulting on the shape of rail services in the South West of England for the next 15 years (2013 to 2028).
There is a very strong case for them to add to the current services of the TransWilts line (see map), which are infrequent and ill-timed for most pot ....