Broad-language JavaScript Chinese programming keywords and built-in Object Function

Source: Internet
Author: User

The goal of broad language is to eliminate all keywords and syntaxes. It uses only one format of "function parameters", that is, the first word is a function word, and the rest is a parameter to implement natural language execution and programming, the following is the process of keyword function and built-in object function. Currently, symbols such as "()", "{}", and ";" are retained. These symbols will be automatically added later, javascript Chinese programming is implemented based on JavaScript native. In the future, a JavaScript Engine that directly supports JavaScript Chinese programming will be added to explain it to a wide range of languages.
Function variable (parameter) {perform ("Var" + parameter );}
Function Integer (parameter) {return parseint (parameter );}
Function floating (parameter) {return parsefloat (parameter );}
Function for (parameter) {return parameter 3 (parameter). Replace (rule (parameter 1 (parameter), parameter 2 (parameter ));}
Function Lookup (parameter) {return parameter 2 (parameter). Search (rule (parameter 1 (parameter). tostring ();}
Function truncation (parameter) {return parameter 3 (parameter). substr (parameter 1 (parameter), parameter 2 (parameter) = ""? Undefined: parameter 2 (parameter ));}
Function cut (parameter) {return parameter 3 (parameter). substring (parameter 1 (parameter), parameter 2 (parameter) = ""? Undefined: parameter 2 (parameter ));}
Function new (parameter) {return New Parameter ;}
Function (parameter) {return typeof parameter ;}
Function Wang (parameter) {return window instanceof object ;}
Function bullet (parameter) {alert (parameter); Return parameter ;}
Function Description (parameter) {console. Log (parameter); Return parameter ;}
Function and (parameter) {bullet (parameter); lecture (parameter);} // trace
Function culvert (parameter ){
VaR fruit = "(parameter ){";
VaR string function = find ("/\ s +/," + parameter );
VaR string function name = cut ("0," + String Function + "," + parameter );
VaR string body = cut (string space + "," + parameter );
Fruit = string letter name + fruit + String letter body + ";}";
If = ("/Return (\ s +)/g, return $1," + If );
// Play (fruit );
Executive ("function" + result );
}
Function execution (parameter ){
VaR fruit = "";
Try {
Result = eval (parameter + ";"); // partial execution
Return result;
} Catch (worm ){
Return "[performance]" + insects;
}
}
VaR perform 1 = eval;
Function fulfillment (parameter ){
VaR fruit = "";
Try {
Result = perform 1 (parameter + ";"); // global execution
Return result;
} Catch (worm ){
Return "[performance]" + insects;
}
}
// Function Plus (parameter) {return INTEGER (parameter 1 (parameter) + INTEGER (parameter 2 (parameter ));}
Han ("add round (parameter 1 (parameter) + round (parameter 2 (parameter ))");
Culvert ("reduction and return (parameter 1 (parameter)-INTEGER (parameter 2 (parameter ))");
Han ("Multiplication round (parameter 1 (parameter) * Round (parameter 2 (parameter ))");
Culvert ("Return (parameter 1 (parameter)/round (parameter 2 (parameter ))");
Han ("Return tangent (parameter 1 (parameter)/INTEGER (parameter 2 (parameter ))");
// Follow (I + you + "good" + Add ("") + subtract ("20, 6") + multiply ") + except ("6, 2 "));
// Follow (tangent ("6, 2 "));
// Change ("/\ W/g,★, Collect the world's smart ria4.com "));
// Play (find ("/\ s/, collect the wisdom of ria4.com "));
// Bullet (intercept ("2, 4, collect the wisdom of ria4.com "));
// Play (cut ("2, 4, collect the wisdom of ria4.com "));
Change ("string = string, number = number, = Boolean, function = function, thing = object, not = undefined, null = NULL, essence = Nan, true = true, false = false, I = 'ria4 ', you = 'you', window = Window, file = Document, calculation = math, date = date, array = array, event = event "); // none = void
// Window. Alert (me );
Bullet (string (3) + String (6 ));
Bullet (number ("3") + number ("6 "));
Bullet (for (3) + for (6 ));
Bullet (thing );
Bullet (not );
Bullet (none); // not good
Bullet (empty );
Bullet (essence );
Bullet (true );
Bullet (false );
Bullet (mooring (4 ));
Play (Wang (["OK"]);
Bullet (file. Links );
Play (calculate. Random ());
Play (New (date). getdate ());
Play (New (array). Length );
Bullet (event );
The above code in the http://ria4.com select "online programming" → choose [for Chinese programming] → choose [keyword letter and built-in object function] test through

Micro game studio game (close-range automatic dating mobile games) QQ group: 16619390

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.