Oxygen Basic

Programming => Problems & Solutions => Topic started by: on October 12, 2018, 01:01:23 PM

Title: #pragma
Post by: on October 12, 2018, 01:01:23 PM
Apparently #pragma is ignored.

An useful use of #pragma in FreeBasic is #pragma once. It prevents a file to be included more than once even if the code does not use #include once. PowerBasic uses #INCLUDE THIS ONCE to do the same that FB's #pragma once.
Title: Re: #pragma
Post by: Arnold on October 12, 2018, 01:24:35 PM
I think the keywords: use/uses should serve this purpose, see:

https://www.oxygenbasic.org/forum/index.php?topic=1535.msg16744#msg16744
Title: Re: #pragma
Post by: on October 12, 2018, 01:34:06 PM
use and uses are equivalent to include once.

#pragma once at the begining of an include file prevents that file to be included more than once even if the user uses include <file> without using "once".
Title: Re: #pragma
Post by: Arnold on October 13, 2018, 12:44:52 AM
Hi José,

I do not use 'include' any more - but this is a matter of taste.

BTW: maybe you have already found /inf/OxyLog.txt (history, changelog and issues) and /inf/testlog.o2bas (testcases). I think you and Mike are much more qualified to compare Oxygen's capabilities with other programming languages than users like me. Constructive criticism is always helpful. Therefore I am convinced that Charles will make the most of your ideas in the next version / versions of Oxygen, as long as this is possible and does not clash too much with his own concept.

Roland