How I would love to have the former .ini files of the good old days of Win95/98 which you could edit with any text editor.

(Thanks for the zip.)afanofosc wrote:The thing (or one of the things) I found confusing was that calling ArrayInit(data, 10, 1000) on a byte array that was previously empty did not result in the PoolSize going up by ~1000 and when I copied it to another byte array that was previously empty it didn't go up further.
Code: Select all
PoolSize Dataspace
0 204 108
1 205 109
2 206 110
3 207 111
5 209 113
10 214 118
15 219 123
20 224 128
25 229 133
50 254 158
51 255 159
52 0 160
Code: Select all
//test2.nxc
task main(){
byte test_array[];
ArrayInit(test_array, 0, 143);
int ps, ds;
GetMemoryInfo(true, ps, ds);
TextOut(100, LCD_LINE1, test_array);
NumOut(0, LCD_LINE1, ps);
NumOut(0, LCD_LINE2, ds);
Wait(6000);
}
Code: Select all
int x;
int y;
void Jump(int & sx, int & sy)
{
sx++;
sy++;
}
task t1()
{
while(1)
{
PointOut(x,y);
Wait(50);
}
}
task t2()
{
while(1)
{
Jump(x,y);
}
}
task main()
{
Precedes(t1,t2);
}
Code: Select all
int x=0;
int y=0;
void Jump(int & sx, int & sy)
{
sx++;
sy++;
}
task t1()
{
while(1)
{
PointOut(x,y);
Wait(500);
}
}
task t2()
{
while(1)
{
Jump(x,y);
NumOut(0, LCD_LINE8, x);
NumOut(50, LCD_LINE8, y);
Wait(500);
}
}
task main()
{
Precedes(t1,t2);
}
Code: Select all
int x=0;
int y=0;
void Jump(int & sx, int & sy)
{
repeat(5)
{
sx++;
sy++;
}
}
task t1()
{
while(1)
{
PointOut(x,y);
Wait(500);
}
}
task t2()
{
while(1)
{
Jump(x,y);
NumOut(0, LCD_LINE8, x);
NumOut(50, LCD_LINE8, y);
Wait(500);
}
}
task main()
{
Precedes(t1,t2);
}
Users browsing this forum: Semrush [Bot] and 9 guests