Upcoming SlideShare
×

# MemeScript Language

2,297 views
2,137 views

Published on

This is the downloadable development resource shown in the video tutorial 102- Introduction to MemeScript. For any mobile app developers currently using or considering using adopting Meme IDE.

find out more
http://www.memeapps.com/

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
2,297
On SlideShare
0
From Embeds
0
Number of Embeds
656
Actions
Shares
0
11
0
Likes
0
Embeds 0
No embeds

No notes for slide

### MemeScript Language

1. 1. introduction to102 - MemeScript Prerequisites 101 - Hello Meme IDE
2. 2. 1Contents2 MemeScript Example 21 Naming Conventions3 Meme IDE Function Editor 22 Defining an Address Record4 Primitive Types 23 Adding List of Addresses to Person5 Declaring Integer Variables 24 Creating a Person Record6 Declaring Decimal Variables 25 ‘Dot’ Notation7 Declaring Boolean Variables 26 String Concatenation8 Declaring Strings 27 String Comparison9 Default Initializations 28 String Utilities10 Pre-defined Complex Types 29 Collections11 IF 30 INSERT12 IF/ELSE 31 Collections and {}13 IF/ELSEIF/ELSE 32 Removing from a Collection14 WHILE 33 Date and Time Types15 FOR 34 Date and Time Arithmetics16 Arithmetic 35 Date and Time Utilities17 Logical Operations 36 Date Formatting18 Dataspace 37 Time Formatting19 Defining a ‘Person’ Record 38 Other Free Tutorials20 Adding Attributes to the ‘Person’ Record
3. 3. 2MemeScript Example var x = 10; var y = 20; var z : Integer; z = x + y; notify(z);
4. 4. 3Meme IDE Function Editor
5. 5. 4Primitive Types• Integer 10, -234• Decimal 1.23• String “ABC”• Boolean true, false
6. 6. 5Declaring Integer VariablesLocal variables within functionsvar x : Integer;var x2 = 1;
7. 7. 6Declaring Decimal Variablesvar d : Decimal(2);var d2 = 1.23;
8. 8. 7Declaring Boolean Variablesvar b : Boolean;var b2 = true;
9. 9. 8Declaring Stringsvar s : String;var s = “abc”;
10. 10. 9Default Initializations• String - empty string “”• Integer and Decimal – 0• Boolean – false
11. 11. 10Pre-defined Complex Types• Date – day, month, year• Time – hour, minute, second• Duration – hour, minute, second• Timestamp
12. 12. 11IFvar a = 15;if (a > 10){ notify(“A is big”);}
13. 13. 12IF / ELSEvar a = 15;if (a > 10){ notify(“A is big”);}else{ notify(“A is small”);}
14. 14. 13IF / ELSEIF / ELSEvar a = 15;if (a > 10){ notify(“A is big”);}elseif (a > 5){ notify(“A is medium sized”);}else{ notify(“A is small”);}
15. 15. 14WHILEvar x = 0;while (x < 10){ x++; // do other things}
16. 16. 15FORvar names : String[];append(names, “Simon”);append(names, “Graham”);append(names, “Joe”);for (name in names){ notify(name);}
17. 17. 16Arithmeticvar c = 20;f = c * (9.0 / 5.0) + 32;notify(f);
18. 18. 17Logical Operatorsvar x = 10;if ((x > 10) and not (x > 20)){ notify(“x is middle sized”);}
19. 19. 18Dataspace
20. 20. 19Defining a ‘Person’ Record
21. 21. 20Adding Attributes to the ‘Person’ Record
22. 22. 21Naming ConventionsRecord Type Names• bumpy case with initial uppercase, e.g. Person or EmployeeDetailsAttribute names in records• bumpy case with initial lowercase e.g. name or firstName
23. 23. 22Defining an Address Record
25. 25. 24Creating a Person Recordvar p : Person;var a : Address;a.line1 = “12 High St”;a.zip = “PA 12345”;p.name = “Simon”;p.tel = “1234567”;append(p.addresses, a);