Symbol (programming): Difference between revisions

Content deleted Content added
removed from categ Category:Lisp programming language Category:Ruby programming language as its just a feature of these and many other languages
Yobot (talk | contribs)
m WP:CHECKWIKI errors fixed + general fixes, removed stub tag using AWB (8961)
Line 89:
 
====Examples====
The following is a simple example of a symbol literal in Ruby:<ref name=pickaxe />:
<source lang=ruby>
my_symbol = :a
Line 100:
my_string = :hello.to_s
</source>
Symbols are objects of the <code>Symbol</code> class in Ruby:<ref name=rdocsymbol>{{cite web|title=Symbol|url=http://www.ruby-doc.org/core/classes/Symbol.html|work=Ruby Documentation|accessdate=10 July 2011}}</ref>:
<source lang=ruby>
my_symbol = :hello_world
Line 150:
[[Category:Articles with example Ruby code]]
[[Category:Programming constructs]]
 
 
{{compu-prog-stub}}