Welcome, Guest. Please login or register.

Author Topic: Does SASC have a secret C99 switch?  (Read 3010 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Does SASC have a secret C99 switch?
« on: December 02, 2005, 02:56:28 PM »
It would be nice if I could sometimes use C99 features in SASC.  Is it possible?

For example declaring variables where they are needed, not always in the first few lines of a 'block'.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline kas1e

Re: Does SASC have a secret C99 switch?
« Reply #1 on: December 02, 2005, 03:21:10 PM »
The same question from me :) http://www.amiga.org/forums/showthread.php?t=18951

but still not have answer. I think time to read all sasc documentation :) Becouse 'static declaration' problem already f**ked up for me ..
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2281
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: Does SASC have a secret C99 switch?
« Reply #2 on: December 02, 2005, 05:20:00 PM »
I think SAS was out before the C99 specification was complete.  If you want C99 try VBCC.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Does SASC have a secret C99 switch?
« Reply #3 on: December 02, 2005, 06:06:50 PM »
@ChaosLord
Quote
Does SASC have a secret C99 switch?

No.

Quote
It would be nice if I could sometimes use C99 features in SASC. Is it possible?

No.
 

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Does SASC have a secret C99 switch?
« Reply #4 on: December 02, 2005, 06:23:34 PM »
I think I found it here! Experimental C++ compiler.
It should have the feature we want.

https://www.warped.com/amiga/

But the file has been deleted!
 :bigcry:  :bigcry:  :bigcry:
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Does SASC have a secret C99 switch?
« Reply #5 on: December 02, 2005, 07:13:46 PM »
@ChaosLord

That stuff has nothing to do with C99 though.

Also, the C++ stuff wasn't very complete I'm afraid.
 

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Does SASC have a secret C99 switch?
« Reply #6 on: December 03, 2005, 12:04:05 AM »
@Piru

I was under the impression that most C++ compilers, even unfinished experimental versions had many C99 features. (?)
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline kas1e

Re: Does SASC have a secret C99 switch?
« Reply #7 on: December 03, 2005, 07:25:14 AM »
vbcc is good, but little slower over sasc.
btw, only one think in sasc is annoing me - declaring variables in statemn blocks. Maybe any ideas to avoid/path it/etc ? Maybe kind of macros,or somethink like ..
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Does SASC have a secret C99 switch?
« Reply #8 on: December 03, 2005, 12:40:38 PM »
VBCC is handy as a C99 compiler, although it doesn't implement everything in the C99 specification. That said, I haven't had any problems with it.
int p; // A
 

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Does SASC have a secret C99 switch?
« Reply #9 on: December 03, 2005, 12:52:20 PM »
Does VBCC have a good graphical debugger as SASC does?
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Does SASC have a secret C99 switch?
« Reply #10 on: December 03, 2005, 01:05:09 PM »
@ChaosLord
Quote
I was under the impression that most C++ compilers, even unfinished experimental versions had many C99 features. (?)

I guess it depends on your definition of 'many'.

Regardless C++ isn't C.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Does SASC have a secret C99 switch?
« Reply #11 on: December 03, 2005, 03:11:06 PM »
Quote

Piru wrote:

Regardless C++ isn't C.


True. If you write good clean C code, it should compile fine under C++ but there are more caveats than just the non implicit void * cast. You'd have to be unlucky to run into them, however.

For AmigaOS, the only real syntactical gotcha I ever stumbled across was the library base structure name / library base pointer name issue which was down the the deprecation of the 'struct' keyword beyond defining the structure:

struct IntuitionBase* IntuitionBase;

is fine in C, but in ANSI C++ it caused problems.

IntuitionBase* IntuitionBase;

was also a problem, I had to use

IntuitionBase* ::IntuitionBase;

:-)
int p; // A