Training, Open Source Programming Languages

This is page http://www.wellho.net/mouth/3430_Sig ... rtran.html

Our email: info@wellho.net • Phone: 01144 1225 708225

 
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))
Sigils - the characters on the start of variable names in Perl, Ruby and Fortran

A sigil (from Latin sigillum "seal") is a symbol created for a specific magical purpose. A sigil is usually made up of a complex combination of several specific symbols or geometric figures, each with a specific meaning or intent. In computer programming, a sigil is a special symbol attached to a variable name, showing the variable's datatype or scope. Philip Gwyn, in 1999 adopted the term "to mean the funny character at the front of a Perl variable" and the term is applicable to Ruby too.

Ruby - everything is an object, the sigil defines the scope;

@abc Object variable. There's an @abc within each object in a class
$abc Global variable. Shared between methods / functions without being passed
@@abc Class variable. There's only one @@abc in a class, shared between all objects in the class
abc Local variable within current function / method / other similar closure
Abc Constant. Once set, it's read only
:abc Not really a variable either. An efficient unchanging piece of text.

Perl - definition is data type. Scope controlled with presence (or absence) of keywords my or our

$abc Scalar. Integer, float, string, reference or regular expression
@abc A list of scalars. Members are numbered upward from 0, so an ordered collection
%abc A hash of scalars. Members are keyed by any scalar, often a string. An unordered collection
abc A file handle
&abc A piece of code. A sub
*abc A Typeglob - a joint name for one of each of the abpve.

Rather than special characters, Fortran used specific start letters for its variable names to represent interegers (start letter I J K L M and N) and reals (A to H and O to Z). An IMPLICIT statement was added at Fortran 77

Hungarian notation is where a variable name starts with a group of letters which are mnemonics for the type or purpose of that variable. That's followed by whatever name the programmer has chosen. So Fortran is an example where Hungarian notation is built into the language.

Hungarian notation is also often used as a convention (rather than a rule) in languages such as C and C++. It helps the coder who's revisiting the program for maintainance purposes to see what's what at a later date without having to scroll all the way back to the top of a piece of code. [example]:
    int weight = 96;
    int *pWeight = &weight;
    int &rWeight = weight;

(written 2011-09-10)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
R103 - Basic Ruby Language Elements
  [986] puts - opposite of chomp in Ruby - (2006-12-15)
  [2287] Learning to program in Ruby - examples of the programming basics - (2009-07-15)
  [2296] Variable scope - what is it, and how does it Ruby? - (2009-07-18)
  [2613] Constants in Ruby - (2010-02-01)
  [2617] Comparing floating point numbers - a word of caution and a solution - (2010-02-01)
  [3278] Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java. - (2011-05-05)
  [3758] Ruby - standard operators are overloaded. Perl - they are not - (2012-06-09)
  [3917] BODMAS - the order a computer evaluates arithmetic expressions - (2012-11-09)
  [4324] Learning to program - variables and constants - (2014-11-22)
  [4369] Ruby - the second rung of learning the language - (2014-12-28)
  [4504] Where does Ruby load modules from, and how to load from current directory - (2015-06-03)

P301 - Variables in Perl
  [975] Answering ALL the delegate's Perl questions - (2006-12-09)
  [1581] What is an lvalue? (Perl, C) - (2008-03-18)
  [1946] Variable Types in Perl - (2008-12-15)
  [2241] Perl references - $$var and \$var notations - (2009-06-15)
  [2374] Lead characters on Perl variable names - (2009-08-24)
  [2877] Further more advanced Perl examples - (2010-07-19)
  [2972] Some more advanced Perl examples from a recent course - (2010-09-27)
  [3059] Object Orientation in an hour and other Perl Lectures - (2010-11-18)
  [4398] Accessing variables across subroutine boundaries - Perl, Python, Java and Tcl - (2015-01-18)
  [4608] Introspecion in Perl 6 - (2016-01-02)

P251 - Perl Review
  [2242] So what is this thing called Perl that I keep harping on about? - (2009-06-15)
  [3007] Setting up a matrix of data (2D array) for processing in your program - (2010-10-21)
  [3042] Least Common Ancestor - what is it, and a Least Common Ancestor algorithm implemented in Perl - (2010-11-11)
  [3407] Perl - a quick reminder and revision. Test yourself! - (2011-08-26)

C234 - C and C based languages - Further C++ Object Oriented features
  [801] Simple polymorphism example - C++ - (2006-07-14)
  [802] undefined reference to typeinfo - C++ error message - (2006-07-15)
  [831] Comparison of Object Oriented Philosophy - Python, Java, C++, Perl - (2006-08-13)
  [1159] It can take more that one plus one to get two. - (2007-04-22)
  [1819] Calling base class constructors - (2008-10-03)
  [2004] Variable Scope in C++ - (2009-01-22)
  [2005] Variables and pointers and references - C and C++ - (2009-01-23)
  [2576] What does const mean? C and C++ - (2010-01-15)
  [2673] Multiple Inheritance in C++ - a complete example - (2010-03-12)
  [2717] The Multiple Inheritance Conundrum, interfaces and mixins - (2010-04-11)
  [2849] What are C++ references? Why use them? - (2010-07-02)
  [3057] Lots of things to do with and within a C++ class - (2010-11-16)
  [3069] Strings, Garbage Collection and Variable Scope in C++ - (2010-11-25)
  [3124] C++ - putting the language elements together into a program - (2011-01-08)
  [3238] Bradshaw, Ben and Bill. And some C and C++ pointers and references too. - (2011-04-09)
  [3509] Operator Overloading, Exceptions, Pointers, References and Templates in C++ - new examples from our courses - (2011-11-06)
  [3982] Using a vector within an object - C++ - (2013-01-19)
  [4366] Changing what operators do on objects - a comparison across different programming languages - (2014-12-26)
  [4377] Designing a base class and subclasses, and their extension, in C++ - (2015-01-01)
  [4559] When do I use the this keyword in C++? - (2015-10-29)


Back to
Searching through all the files in or below a directory - Ruby, Tcl, Perl
Previous and next
or
Horse's mouth home
Forward to
Ruby at both extremes of your website
Some other Articles
Sundays - and over eating
Exceptions - a fail-safe way of trapping things that may go wrong
3 digit HTTP status codes - what are they, which are most common, which should be a concern?
Ruby at both extremes of your website
Sigils - the characters on the start of variable names in Perl, Ruby and Fortran
Searching through all the files in or below a directory - Ruby, Tcl, Perl
How many days to Christmas?
What is on the Melksham Agenda?
Automed web site testing scripted in Ruby using watir-webdriver
Our National Autograss Champion, from Melksham
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).

© 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.net/mouth/3430_Sig ... rtran.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb