Content deleted Content added
m Standardize spelling of Initialise/Initialize |
m →External links: HTTP to HTTPS for SourceForge |
||
(12 intermediate revisions by 8 users not shown) | |||
Line 1:
{{Short description|Object-oriented programming language}}
{{primary sources|date=January 2008}}
Line 68 ⟶ 69:
}, {:parent_object_a, :parent_object_b})
</pre>
This code fragment will define a new exemplar called <code>my_object</code> that has two slots (or fields) called <code>slot_a</code> (pre-
===Comparison===
Line 94 ⟶ 95:
_endmethod
</pre>
It is convention to supply two methods <code>new()</code> (to create a new instance) and <code>init()</code> (to
<pre>
# New method
Line 101 ⟶ 102:
_endmethod
#
_private _method person.init(name, age)
# Call the parent implementation.
_super.init(name, age)
#
.name << name
.age << age
Line 176 ⟶ 177:
</pre>
===Regular
Magik supports // regular expression syntax:
Line 192 ⟶ 193:
</pre>
===HTTP
Magik supports making HTTP or HTTPS requests via http library, see below examples:
Line 201 ⟶ 202:
</pre>
===Language
Because Magik was originally developed in England, methods in the core smallworld libraries are spelled using [[British English]]. For example:
Line 209 ⟶ 210:
Like other programming language Magik too has collections. They include the following:
*Simple Vector
*Rope - a [[dynamic array]]
*[[Hash Table]]
*Property List
*Equality set
Line 226 ⟶ 227:
*[http://www.ge-energy.com/products_and_services/products/geospatial_systems_and_mobile_workforce/index.jsp Smallworld Product Suite Technology]
*[http://www.mdt.net/ MDT - Magik Development Tools] IDE for GE Smallworld GIS developers
*[
*[http://lambda-the-ultimate.org/classic/message5839.html#5886 Language forum post on Magik]
*[https://archive.
*[http://www.magikemacs.com/page/6/ GE Smallworld, Emacs Extensions for Magik developers] {{Webarchive|url=https://web.archive.org/web/20160425011048/http://www.magikemacs.com/page/6/ |date=2016-04-25 }}
*[https://marketplace.visualstudio.com/items?itemName=siamz.smallworld-magik Visual Studio Code extension for Smallworld Magik programming language.]
{{DEFAULTSORT:Magik}}
[[Category:Class-based programming languages]]
|