Well I have cobbled together an IDE and Aurora has compiled its first "hello world" applicaiton.
The IDE uses the scintilla control so it has support for function folding and such. Still a lot of work to do ;)
Sounds great! :)
Scintilla is definately the right choice.
I'd like to see you include code regions (like in .NET). It's very handy to be able to do something like this for code folding:
// #REGION Comment History Box
/*
Description: ....
More Comments....
*/
// #ENDREGION Comment History Box
or
// #REGION Form Generation Code
sub FormCreate
etc...
endsub
sub FormHandler
etc....
endsub
sub SomeOtherFormRelatedFunction
etc....
endsub
// #ENDREGION Form Generation Code
Scintilla really is a nice source editing component. Even has column block selection by holding down the Alt key. Something I use alot in other IDEs.
Just thought I would mention it.
Wow! I can't believe how much you've got done already! Didn't think you could stay away from it long though :D
This was compiled successfully today ;)
class myclass {
declare function1(int a),int;
declare function2();
int a;
string b;
}
myclass :: function1(int a)
{
writeln(str$(this));
return 1;
}
myclass :: function2()
{
return;
}
Now to actually call the functions ::)
I can't wait!! ;D
The first class function was called last night at 4 am. :) It referenced a class variable, modified it and printed it with another class function.
Fun stuff.
I held off on updating the alpha since I was on a roll.
Genius at work ..ÂÃ, ::)
Graham
Getting closer to another alpha update. Been swamped at work so not a lot of programming time.
NEW and DELETE are finished and handle classes properly. Soon to have the first GUI functions working.
Still need more feedback/testers. Only 8 of us involved right now which leaves a lot of room for things to be missed.
Paul.
Another crash ;D
global sub main() {
openconsole();
writeln("Hello World");
closeconsole();
while getkey() = "";
return 0;
}
Putting the wait after the closeconsole function crashes the compiler instead of reporting an error.
Lewis
No crash here. Compiles and does as expected....flickers the console for a moment.
Paul.
Of course that will leave the program running in memory, while it waits for input from a non-existant stream. You have to open your task manager to kill it.
Paul.
strange, it crashed before it compiled it here. It works now though, obviously like you said leaving it in memory.
Lewis
The compiler crashes on this function:
sub GetWord(Document doc),pointer
{
// FIX THIS!
byte ch;
pointer tk;
unsigned int start;
start = doc.uPos;
ch = doc.*(string)pText[doc.uPos];
tk = _new(len(Token));
while (IsWord(ch))
{
doc.uPos++;
ch = doc.*(string)pText[doc.uPos];
}
*(token)tk.pValue = _new((doc.uPos-startpos)+1);
*(token)tk.*(string)pValue = mid$(doc.*(string)pText, startpos+1, doc.uPos - startpos);
*(token)tk.uLine = doc.uLine;
*(token)tk.uClass = TKWORD;
}
If I comment it out, it just reports errors about 'undeclared function GetWord'. I added the pointers types because I thought that was the problem which it has been before.
I've narrowed it down to three lines that it's having problems with:
//*(token)tk.pValue = _new((doc.uPos-startpos)+1);
//*(token)tk.*(string)pValue = mid$(doc.*(string)pText, startpos+1, doc.uPos - startpos);
//*(token)tk.uLine = doc.uLine;
If I comment those out it compiles fine.
unsigned int start;
start = doc.uPos;
You are calling this "startpos" later?
:-[ I guess I am... well, it should hurt my code, but it still crashes the compiler which isn't good. I'll have to fix that when I get home.
It's an alpha. Expect a few crashes and roadblocks.
Will have fixed shortly ;)
Your sub is also missing a 'return' statement
Okay, got it to work with this:
sub GetWord(Document doc),pointer
{
byte ch;
pointer tk;
unsigned int start;
start = doc.uPos;
ch = doc.*(string)pText[doc.uPos];
tk = _new(len(Token));
while (IsWord(ch))
{
doc.uPos++;
ch = doc.*(string)pText[doc.uPos];
}
*(token)tk.pValue = _new((doc.uPos-start)+1);
*(token)tk.*(string)pValue = mid$(doc.*(string)pText, start+1, doc.uPos - start);
*(token)tk.uLine = doc.uLine;
*(token)tk.uClass = TKWORD;
return tk;
}
It doesn't seem to like pointers to strings, tokens, etc. I had to change the 'pText' member of Document to a pointer instead of string *. Also, the 'uLine' member didn't exist, which was probably causing a crash.
Hey VS .. you'll be amazed to know, I can't figure out what the heck it says .. :)
Maybe understanding comes with practice ..
best wishes from a Basic person, :)
Graham
The subroutine is supposed to extract a token from a piece of text. A lot of it is in other structures and subroutines, and unless you saw the whole source file, it would be hard to figure out what it means. A token contains a pointer for the value, its 'class' (word, number, string, operator, etc), and the line number. A document contains a lot of members, a couple are the length of the text, a pointer to the text, a list of tokens, the current position.
I just said I got it to compile. The program still doesn't run correctly. I'm rewriting it :)