Author Topic: #pragma  (Read 554 times)

0 Members and 1 Guest are viewing this topic.

Josť Roca

  • Sr. Member
  • ****
  • Posts: 263
#pragma
« 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.

Arnold

  • Hero Member
  • *****
  • Posts: 837
Re: #pragma
« Reply #1 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

Josť Roca

  • Sr. Member
  • ****
  • Posts: 263
Re: #pragma
« Reply #2 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".

Arnold

  • Hero Member
  • *****
  • Posts: 837
Re: #pragma
« Reply #3 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