Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Introspection/Oz/introspection.oz
Normal file
14
Task/Introspection/Oz/introspection.oz
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
declare
|
||||
Version = {Property.get 'oz.version'}
|
||||
%% Version is an atom like '1.4.0'. So we can not compare it directly.
|
||||
%% Extract the version components:
|
||||
[Major Minor Release] = {Map {String.tokens {Atom.toString Version} &.} String.toInt}
|
||||
in
|
||||
if Major >= 1 andthen Minor >= 4 then
|
||||
%% check whether module Number exports a value 'abs':
|
||||
if {HasFeature Number abs} then
|
||||
{Show {Number.abs ~42}}
|
||||
end
|
||||
else
|
||||
{System.showInfo "Your Mozart version is too old."}
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue