Skrava
-
Skrava
Skrava is a new language that is a morph of Java and an easier language: Skript. You are able to use methods from the original Java language used for many times but in easier "functions".
For example...
function myFunction(i: number) :: number:
set {_i} to {_i} + 1
Code (Java):
function myFunction(i: number) :: number:
set {_i} to {_i} + 1
[INDENT]return {_i}
Another example for creating numbers with commas...
Code (Java):function splitCoins(int: text) :: text:
set {_Coins} to "%{_int}%"
set {_length} to length of {_Coins}
if {_length} >= 3:
set {_mod} to {_length} mod 3
if {_mod} is 0:
set {_groups::*} to groups 1 of {_Coins} matched to "([0-9]{3})"
set {_Coins} to "%join {_groups::*} with "".""%"
else:
set {_1} to the first {_mod} characters of {_Coins}
set {_2} to subtext of {_Coins} from characters ({_mod}+1) to {_length}
set {_groups::*} to groups 1 of {_2} matched to "([0-9]{3})"
set {_Coins} to "%{_1}%.%join {_groups::*} with "".""%"
return {_Coins}
Dependant on Skrava - plugin. - Loading...
- Loading...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM