GAMERS LAIR

syleox

Well-known member
Messages
3,593
Points
113
its created when you use the line of code but its basically an automatic counter in that case between the two range of numbers.

its like doing this...

C++:
int i = 0;
int min = 2;
int max = 4;

i = min;

do {
    // this code runs
    i = i + 1;
while (i < max);

basically the code is called one time for each number between a range of numbers...the "i" keeps count of the current number in the loop.
some time ago i learned some c++ from an android app
one of the lessons was like :
int x = 0
int x = 4
int y = 1

function x + y
return

what is the value given by return ?


was trouble during 10 days about this, then i realised that I have to admit that the int has change value for no reason 🤦‍♂️
 

WhatNitrous

Well-known member
Messages
23,482
Points
113
some time ago i learned some c++ from an android app
one of the lessons was like :
int x = 0
int x = 4
int y = 1

function x + y
return

what is the value given by return ?


was trouble during 10 days about this, then i realised that I have to admit that the int has change value for no reason 🤦‍♂️
That codes invalid from the start unless you made a typo.

two

int x = #

would crash...cant have two lf the same variable names.

naybe

C++:
long sum() {
    int x = 0;
    int y = 4;
    x = 4;
    y = 1;

    return x + y;
};

which would be 5
 

WhatNitrous

Well-known member
Messages
23,482
Points
113
That codes invalid from the start unless you made a typo.

two

int x = #

would crash...cant have two lf the same variable names.

naybe

C++:
long sum() {
    int x = 0;
    int y = 4;
    x = 4;
    y = 1;

    return x + y;
};

which would be 5
See, "int" is the TYPE of data (integer or short number), the data is actually x and y.

My mouse that used unsigned...it stands for unsigned integer. which means it can have a negative or positive value (half of the value of a signed integer) which goes from 0 to 32,767 basically 16 KiB in either positive or reverse.

Sorry got mixed up, 32 KiB in either direction, max integer is 65, 535 (0xFFFF)
 

WhatNitrous

Well-known member
Messages
23,482
Points
113
Thats actually my biggest peeve about script coders...they don't think about the fact they may need to read their own script 5 years down the road and modify it...so they make everything one giant statement on one single line with no spaces because the code doesn't prevent it.

You can't do that in C and for good damn reason, it was complicated enough without Ieeto stupidity :LOL:

And in C the bitwise operators have literally like 9 different functionalities depending how their used. & |
 

syleox

Well-known member
Messages
3,593
Points
113
beats me dude...never seen that work..and c++ requires a semicolon at the end of each line so idfk whats going on there :LOL:

If it was one capital X and one lowercase x that would have worked.

C/C++ are case sensitive.

Find a new app? :ROFLMAO:
yes i omited the semi colon for rapidity

maybe my example was nested, no sure : it was long time ago 🤷‍♂️
i still have the app, lol they even gave me a certificate for finishing the course 🤣
 

WhatNitrous

Well-known member
Messages
23,482
Points
113
I honestly might not have the answer for you anyways, never really cared and ren'py changes so often its almost impossible to keep up...especially since 5 other things changing force it to change on top.

Its made in python and uses pygame so both of their changes affect it...then it has its own issues and identity crises about which to use or which it does. At first one wasnt supported then it was the only one 😵

OpenGL is the main bases, other than that i dont know offhand.
 
Top