Author Topic: Stack length  (Read 3541 times)

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Stack length
« on: September 02, 2006, 06:59:22 AM »
Had a problem when writing a 1G bot and think I know why but wanted to confirm.

Lengthy bit of And Or code needed to be put at start of series of instructions or it wouldn't work properly.

Occured to me that if the stack has a max length and it zero's anything over that then I might have run out of space for the calculation to be carried out properly.

Is that stack thing true? If so what's the max length?
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Stack length
« Reply #1 on: September 02, 2006, 07:19:18 AM »
Pretty sure it's twenty still. Now it'll drop numbers off the bottom whenever it over fills.

Example:

19) 664
20) 452

Number added to top:

19) 344
20) 452

Anyways it's not normally a problem, as you add SG conditions like *.robage sgn you can simply mult them together. Normally I try to keep all my conditions equaling 1 for true or zero for false just to keep things straight and the dna working properly.

Ie.
' repro when nrg > 3000 and eye5 < 45
50 .repro *.nrg 3000 sub sgn 0 floor mult 45 *.eye5 sub sgn 0 floor mult
store

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Stack length
« Reply #2 on: September 02, 2006, 12:34:30 PM »
The C++ version I'm working on eliminates the stack limit all together.  So you can look forward to that