Merriam-Webster lost all credit with me when they agreed with Alanis Morissette. http://www.merriam-webster.com/video/0035-ironic.html
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Crimson Wizard on Thu 31/07/2014 15:12:36
Gurok, I just found a compiler bug: it does not restrict dynamic arrays in managed structs (although that's too a pointer).
Guess I forgot to check that particular case.
x = 1;
do
{
x++;
Display("%d", x);
} while(x < 1);
struct DieRoll
{
int BaseModifier;
int DieCount;
int Dice[ ];
import function GetTotalValueOfRoll();
};
function PrepareDice()
{
DieRoll a;
a.DieCount = 3;
a.Dice = new int[a.DieCount];
a.Dice[0] = 6; // d6
a.Dice[1] = 6; // d6
a.Dice[2] = 8; // d8
...
}
managed struct Point
{
int X;
int Y;
};
Point *GetPosition()
{
Point *result;
result = new Point;
result.X = 30;
result.Y = 40;
return result;
}
#define RED GREEN
#define BLUE 456
#define GREEN BLUE
Display("%d", RED); // Prints 456
#undef BLUE
#define BLUE 123
Display("%d", RED); // Prints 123
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.189 seconds with 15 queries.