Local Variable - Local Variables in Ruby

Local Variables in Ruby

Ruby as a language was inspired also by Perl, but in this case, the notation was made simpler: a global variable name must be preceded by a $ sign, like $variable_name, while a local variable has simply no $ sign in front of its name, like variable_name (while in perl all scalar values have a $ in front).

Read more about this topic:  Local Variable

Famous quotes containing the words local, variables and/or ruby:

    While it may not heighten our sympathy, wit widens our horizons by its flashes, revealing remote hidden affiliations and drawing laughter from far afield; humor, in contrast, strikes up fellow feeling, and though it does not leap so much across time and space, enriches our insight into the universal in familiar things, lending it a local habitation and a name.
    —Marie Collins Swabey. Comic Laughter, ch. 5, Yale University Press (1961)

    Science is feasible when the variables are few and can be enumerated; when their combinations are distinct and clear. We are tending toward the condition of science and aspiring to do it. The artist works out his own formulas; the interest of science lies in the art of making science.
    Paul Valéry (1871–1945)

    Lay down, lay down the bigly bier,
    Lat me the dead look on;
    Wi’ cherry cheeks and ruby lips
    She lay an’ smil’d on him.

    O ae sheave o’ your bread, true-love,
    An’ ae glass o’ your wine,
    For I hae fasted for your sake
    These fully day [is] nine.
    Anna Gordon Brown (1747–1810)