opC++ Features

opC++ Compiler

opC++ Language

opGames Company

Opstatic

opstatic

opstatic is an improved keyword for static in C++.

Differences With C++

The behavior of static in C++ is a well known headache in the language. To define a static variable, you cannot set its default value in the header file - you have to set it in the source as well as defining it in the header.

With opstatic, you can set a static variable's value in any opC++ header file at the declaration location.

Usage


opclass name
{
    opstatic float start_health = 1.5;
}

Recent Changes (All) | Edit SideBar Page last modified on December 01, 2007, at 02:59 PM Edit Page | Page History
Copyright 2010 opGames Inc.