April 25, 2024, 07:46:14 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Making progress

Started by Ionic Wind Support Team, October 27, 2005, 02:21:21 PM

Previous topic - Next topic

0 Members and 38 Guests are viewing this topic.

Ionic Wind Support Team

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 ;)
Ionic Wind Support Team

Vikki


Steven Picard

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

Ionic Wind Support Team

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.
Ionic Wind Support Team

Sean

Wow! I can't believe how much you've got done already! Didn't think you could stay away from it long though :D

Ionic Wind Support Team

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  ::)

Ionic Wind Support Team

Steven Picard


Ionic Wind Support Team

November 06, 2005, 08:25:33 AM #7 Last Edit: November 10, 2005, 12:56:32 AM by Ionic Wizard
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. 

Ionic Wind Support Team

GWS

Genius at work ..ÂÃ,  ::)

Graham
Tomorrow may be too late ..

Ionic Wind Support Team

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.
Ionic Wind Support Team

Zen

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

Ionic Wind Support Team

No crash here.  Compiles and does as expected....flickers the console for a moment.

Paul.
Ionic Wind Support Team

Ionic Wind Support Team

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.

Ionic Wind Support Team

Zen

strange, it crashed before it compiled it here. It works now though, obviously like you said leaving it in memory.

Lewis

Parker

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.

SnarlingSheep


unsigned int start;
start = doc.uPos;

You are calling this "startpos" later?

Parker

 :-[ 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.

Ionic Wind Support Team

It's an alpha.  Expect a few crashes and roadblocks.

Will have fixed shortly ;)
Ionic Wind Support Team

Ionic Wind Support Team

Your sub is also missing a 'return' statement
Ionic Wind Support Team

Parker

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.

GWS

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
Tomorrow may be too late ..

Parker

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 :)