Posts Tagged compile-time constant

C++ For C# Developers: Part 23 – Compile-Time Programming

Tags: , , , , , ,

The vast majority of the code we write executes at runtime. Today’s article is about the other kind of code, which runs during compilation. C# has very limited support for this. In C++, especially its newer versions, most of the language features are usable at compile-time. Read on to learn how to take advantage of this!

Read the rest of this article »

5 Comments

Creating A Better Assert Function

Tags: , , ,

The assert function is found in many languages to provide a way for you to check for errors only in debug builds of your code. For release/production builds, the asserts are removed to make the compiled code smaller and remove all of the overhead of the error checking. Flash doesn’t come with such a feature built-in, but can we build one ourselves? Today’s article will try to do just that using nothing but Adobe’s modern AS3 compiler: ASC 2.0.

Read the rest of this article »

3 Comments

The Const Keyword

Tags: , , , , , ,

Amazingly, I’ve never covered the const keyword, but a couple of recent comments have prompted me to cover the subject in depth with today’s article.

Read the rest of this article »

12 Comments