New child language - (Function member address (structure))

Pages: 1... 1617181920
Jan 19, 2013 at 9:01pm
The Windows header defines min and max as lowercase macros. To prevent this, #define NOMINMAX before including any headers.
Jan 19, 2013 at 9:33pm
Wow! Great! The problem has been completely solved... :)

And thanks EssGeEich. But I don't really understand what you said. In my opinion using console program to input the code makes me annoyed (just because it's small, less convenient, and ugly)

Did you use notepad or copy-paste some simple code? It seems you actually did not test it...

And, what is realtime interpreter? Compiler? Workspace? or anything else?
Last edited on Jan 20, 2013 at 5:50am
Jan 20, 2013 at 1:21am
Hey I want to change the word :
else if ->elif
Any suggestion?
Jan 20, 2013 at 5:42am
Wow! By chance I discovered the parser is able to define variables inside the expression :

1
2
3
4
5
6
7
8
int a;
int b[100];
int *c;

int array[int size = 16];
printf("Pow result = %f\n\n", double result = pow(double value = 4.00, 2.00));

printf("%.3f ^ %.3f = %.3f\n", value, 2.00, result);


???
Last edited on Jan 20, 2013 at 5:46am
Jan 20, 2013 at 1:46pm
Changing 'else if' into 'elif' will "detach" you from C++.
Maybe you should create

#define
#undef
#ifdef
#if

So the user will choose if defining by itself the 'else if' into 'elif'.
Jan 20, 2013 at 2:28pm
http://www.youtube.com/watch?v=FZVuD1algbM

Edit: Great. Now I'm subscribed too.
Last edited on Jan 20, 2013 at 2:29pm
Jan 20, 2013 at 6:26pm
she wrote:
And, what is realtime interpreter?

A realtime interpreter is where you can type in each line of the script separately and it will instantly be evaluated before you can type in the next line. It is good for testing purposes when you want to set something that is only a few lines or you just want to mess around with the interpreter.
Jan 20, 2013 at 8:38pm
More commonly known as a REPL loop.
Jan 20, 2013 at 11:02pm
Thanks helios very much, I'll do some research but perhaps I cannot apply this for my intepreter...Because skimmed quickly its conditions and requirements are not fit :(

Catfish - I'll come back later... But it seems the video you mentioned is very insteresting!
EssGeEich - Yes, thank you for your great idea. I should build up macro feature instead of using only linear search method :)

L B - Thank you, now I understand. Completely this is a new idea. But, is this possible????????
Last edited on Jan 21, 2013 at 1:28pm
Jan 20, 2013 at 11:17pm
But, is this possible????????


No, it's a theoretical construct; no one has done it yet.
Jan 21, 2013 at 1:09pm
Yes, quite impossible I think :)

I understand #define, but what is #ifdef, #if... or any special word which is followed by "#"? And where can I use them?
Jan 21, 2013 at 1:45pm
Jackson Marie wrote:
I understand #define, but what is #ifdef, #if... or any special word which is followed by "#"? And where can I use them?

Did you even begin C++?
Jan 21, 2013 at 2:17pm
??? Yes, I know them, but the question " And where can I use them?". I asked this just because I want to know more information (probably they may be great features and I'll add them into my interpreter) :)
Jan 21, 2013 at 2:29pm
Here are FOR-WHILE iteration structures. Also I am going to make REPEAT iteration. I think in some cases it may be very useful :)

FOR structure :
1
2
3
4
5
6
for(int num = 10;num > 0;num--)
{
     printf("%d, ",num);
     Sleep(100);

}


1
2
3
for(int x = 0;x < 800;x++)
for(int y = 0;y < 600;y++)
SetCursorPos(x,y);


WHILE structure :
1
2
3
4
5
6
7
8
int num = 10;

while(num > 0)
{
     printf("%d, ",num);
     num--;
     Sleep(100);
}


1
2
3
4
int num = 11;

while(num--, Sleep(100), num > 0)
printf("%d, ",num);



printf("FIRE!\n");

:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Jan 21, 2013 at 2:55pm
FOR structure :

1
2
3
4
5
6
for(int num = 10;num > 0;num--)
{
     printf("%d, ",num);
     Sleep(100);

}



1
2
3
for(int x = 0;x < 800;x++)
for(int y = 0;y < 600;y++)
SetCursorPos(x,y);


What??? Are you just repeating beginner loops? There is nothing new in them. That is C++ not a interpreted language.
Jan 21, 2013 at 3:11pm
Let's go with the shorter code:
1
2
3
4
int num = 11;
while(Sleep(100), --num)
    printf("%d...\n",num);
printf("Fire!\n");
Last edited on Jan 21, 2013 at 3:12pm
Jan 21, 2013 at 11:04pm
About you, what is really an interpreted language coder7777???
Last edited on Jan 21, 2013 at 11:05pm
Jan 21, 2013 at 11:18pm
I decided. Before implementing this, I have to get rid of old core machine completely and build up a super...super and ultra super machine that can handle assembly!!!!!!!!!!!!!! :D

- But also most likely it may be impossible... :(
Last edited on Jan 21, 2013 at 11:26pm
Jan 22, 2013 at 12:40am
18 pages almost wasted :'C
Jan 22, 2013 at 5:03am
Hehe just kidding... :D
Do you recognize that merging C++ with assembly is completely impossible?

EDIT : I am very happy with my interpreter now... IF-ELSE structure is almost done, macro library is in progress... ^.^
Last edited on Jan 22, 2013 at 5:07am
Pages: 1... 1617181920