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

Pages: 1... 1617181920
The Windows header defines min and max as lowercase macros. To prevent this, #define NOMINMAX before including any headers.
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
Hey I want to change the word :
else if ->elif
Any suggestion?
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
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'.
http://www.youtube.com/watch?v=FZVuD1algbM

Edit: Great. Now I'm subscribed too.
Last edited on
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.
More commonly known as a REPL loop.
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
But, is this possible????????


No, it's a theoretical construct; no one has done it yet.
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?
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++?
??? 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) :)
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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.
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
About you, what is really an interpreted language coder7777???
Last edited on
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
18 pages almost wasted :'C
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
Pages: 1... 1617181920