Grimoric
Member
Does anyone know if there is a way to override the compiler and make it work more unsafe like C++, I have never needed to do anything like this before?
The problem is that Wombat is written in a C like scripting style and I try to transfer the code to C# without adding things like Convert functions.
I try to get a better overview of the scripts, that is the reason for all this.
The other option is to load the C++ compiler and do it.
-Grim
** If the code below can be run in C# without changing the code. Problem solved **
The problem is that Wombat is written in a C like scripting style and I try to transfer the code to C# without adding things like Convert functions.
I try to get a better overview of the scripts, that is the reason for all this.
The other option is to load the C++ compiler and do it.
-Grim
** If the code below can be run in C# without changing the code. Problem solved **
C#:
using System;
namespace test
{
class Program
{
public int testTrue()
{
return true; // Convert bool to int
}
static void Main(string[] args)
{
int i = 1;
if (testTrue()) // Convert int to bool.
{
Console.WriteLine("i is {0}.", i);
}
}
}
}
// Out: i is 1.