Welcome, Guest. Please login or register.

Author Topic: What does PURE mean in startup assigns?  (Read 3050 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: What does PURE mean in startup assigns?
« on: March 03, 2007, 08:02:15 PM »
Do not ever use PURE unless you know for a fact that the command really is pure.

Using the PURE option on impure commands will lead to disasterous results.
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 ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: What does PURE mean in startup assigns?
« Reply #1 on: March 03, 2007, 08:12:46 PM »
@mel_zoomy

Yes they must be written and/or assembled and/or compiled a certain way.

Since you are coding C... which compiler are you using?

Technically a pure program must place ALL global variables in allocated memory or on the stack.  For example local variables go on the stack in C so they are 100% pure.  But normal variables just go into regular memory and that is impure.  But if you do an AllocMem() and store the vars in that memory then that is pure.

PURE means that the code can be executed multiple times simultaneously.
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 ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: What does PURE mean in startup assigns?
« Reply #2 on: March 03, 2007, 08:26:12 PM »
In C you don't need to AllocMem() any vars or use the stack to create a pure exe.  You just need to compile and link with the proper pure options and the compiler takes care of everything for you.
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 ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: What does PURE mean in startup assigns?
« Reply #3 on: March 03, 2007, 08:32:30 PM »
@lurkist

Just run 1 of those apps twice at the same time and the contents of the entire Amiga universe running on your machine will be displaced in a firey cataclysmic crash.  Well it was nice to have known you. Please write your will and leave all your Amigas to me before you try it.  Thanx.  :-D
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 ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: What does PURE mean in startup assigns?
« Reply #4 on: March 03, 2007, 08:35:01 PM »
@mel

Yes you can use constants any way you want and still be pure.
That is why I said "variables".  You are only limited regarding data which is writeable.
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