Category:OxygenBasic: Difference between revisions
→Examples
mNo edit summary |
|||
(One intermediate revision by one other user not shown) | |||
Line 1:
{{language
|express=both
|site=http://www.oxygenbasic.org/}}
OxygenBasic is a compilable language in the [[BASIC]] genre supporting [[object-oriented programming]], and containing features of [[C]]. Its earliest origins was as a macro [[Assembly]] code language in 2009, but subsequently acquired all the features of a high-level language.
Line 12 ⟶ 14:
'''Iteration:'''
<pre>
int i
string pr
for i=1 to 10
pr+="Line: " i chr(13
next
print pr
Line 22 ⟶ 24:
'''Function:'''
<pre>
function cube(double
return d*d*d
end function
Line 35 ⟶ 37:
string buf
'
method store(string
buf +=
end method
'
method find(string
a=instr 1,buf,
if a then
b=instr a,
return mid buf, b+1, c-b-1
end if
return "( "+key+ " not found )"
end method
'
Line 55 ⟶ 60:
MemoryBank b
b.store
b.store "ships","10 galleons"
▲sealing wax LC3
</pre>
|