Any suggestions? I was thinking about adding challenges/problems that you would have to write which will be tested against expected output etc. Most definitely will be adding String methods here soon when I have time. Capstone is nearly done.
@lordhershey, I will look into putting together a language spec, the original goal was to mimic Java execution.
@danpost, arrays are a necessity and I won't forget about them, just trying to determine how to add them, whether I should continue sticking to how Java does it
A new version of this scenario was uploaded on Tue May 06 23:17:40 UTC 2014
Added the following:
* Arrays; supports multiple dimensions, assigning, and access. As well as .length operator to get an array's length. Not implemented yet: initializing sequence and null checking.
* char type and char casting.
* Built-in rand() method that returns a double in range [0,1).
* Do-while loop.
Some other fixes and improvements.
A new version of this scenario was uploaded on Wed May 07 01:21:25 UTC 2014
Bug fixes
Just noticed the symmetry in the line v2 = v1 + (v1 = v2) of my 3rd implementation of the fibonacci sequence. Programming is beautiful =)
A new version of this scenario was uploaded on Wed May 07 22:06:35 UTC 2014
Can now declare (and initialize) multiple variables of the same type in one statement.
Bug fixes
A new version of this scenario was uploaded on Wed May 07 22:20:47 UTC 2014
Can now declare (and initialize) multiple variables of the same type in one statement (With commas like in Java).
More bug fixes
A new version of this scenario was uploaded on Thu May 08 05:49:40 UTC 2014
Included source. Added array initializing sequences so you can do things like this:
double[] nums = { 12.5, rand(), 2};
nums = new double[]{ 1, 3.25 };
Works for multidimensional arrays as well.
Some bug fixes.
A new version of this scenario was uploaded on Thu May 08 23:44:41 UTC 2014
Added String methods:
* int length()
* boolean isEmpty()
* char charAt(int)
* String substring(int)
* String substring(int, int)
* boolean equals(String)
A new version of this scenario was uploaded on Fri May 09 01:10:46 UTC 2014
Added a majority of String methods. Below is the complete list of supported String methods. Will be working next on compiling together a language spec that will be accessible from the scenario.
char charAt(int)
int compareTo(String)
int compareToIgnoreCase(String)
boolean contains(String)
boolean endsWith(String)
boolean equals(String)
boolean equalsIgnoreCase(String)
int indexOf(char)
int indexOf(char, int)
int indexOf(String)
int indexOf(String, int)
boolean isEmpty()
int lastIndexOf(char)
int lastIndexOf(char, int)
int lastIndexOf(String)
int lastIndexOf(String, int)
int length()
String replace(char, char)
String replace(String, String)
boolean startsWith(String)
boolean startsWith(String, int)
String substring(int)
String substring(int, int)
char[] toCharArray()
String toLowerCase()
String toUpperCase()
String trim()
A new version of this scenario was uploaded on Mon Jun 09 05:44:12 UTC 2014
Added syntax coloring and switches.
Switches work with ints and chars, but only literals since no constants support yet. Breaks with/out labels also work in switches. And of course case and default.
Keywords as variable names no longer allowed, and other bug fixes.
Syntax coloring made possible by new general coloring feature added to TextBox. With extension on TextBox's included ColorCoder class.
A new version of this scenario was uploaded on Mon Jun 09 05:57:45 UTC 2014
Added syntax coloring and switches.
Switches work with ints and chars, but only literals since no constants support yet. Breaks with/out labels also work in switches. And of course case and default.
Keywords as variable names no longer allowed, and other bug fixes.
Syntax coloring made possible by new general coloring feature added to TextBox. With extension on TextBox's included ColorCoder class.
Couple more bug fixes
2014/4/28
2014/4/28
2014/4/29
2014/4/29
2014/4/29
2014/4/29
2014/5/7
2014/5/9
2014/5/10
2014/6/9
2014/6/14