Autor Tema: [BUG] Using variable called 'next' in a Type fails (conclusion: not a bug)  (Leído 3861 veces)

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
This works:
Código: [Seleccionar]
Type Entry;
    Entry* zomg;
End

This doesn't:
Código: [Seleccionar]
Type Entry;
    Entry* next;
End
Result:
Código: [Seleccionar]
file.prg:2: error: END expected ("*")Somehow only failed when using a variable called 'next' in a Type.

[EDIT]
Conclusion:
Not a bug, as can be concluded from the replies.
« última modificación: Diciembre 05, 2008, 01:16:52 am por Sandman »
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12960
  • Karma: 378
Re: [BUG] Using variable called 'next' in a Type fails
« Respuesta #1 en: Diciembre 04, 2008, 11:30:12 pm »
next is reserved word...
check c_main.c, you'd must know it...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] Using variable called 'next' in a Type fails
« Respuesta #2 en: Diciembre 05, 2008, 12:02:54 am »
I will tell it even more awesome: I have no clue what it does. :P

[EDIT]
I also browsed through my DIV manual, but couldn't find it. If I had to guess though, it would be to go to the next Case in a Switch statement? Ugh I dunno!  ;D
« última modificación: Diciembre 05, 2008, 12:10:59 am por Sandman »
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12960
  • Karma: 378
Re: [BUG] Using variable called 'next' in a Type fails
« Respuesta #3 en: Diciembre 05, 2008, 12:18:26 am »
reserved for error handling
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] Using variable called 'next' in a Type fails
« Respuesta #4 en: Diciembre 05, 2008, 12:20:21 am »
Okay, still don't know it. Is there some documentation on it somewhere? Could you explain it otherwise?
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12960
  • Karma: 378
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] Using variable called 'next' in a Type fails
« Respuesta #6 en: Diciembre 05, 2008, 12:43:28 am »
Alright, looks interesting. Don't quite understand it all though.

I must say that I find the reservation of 'next' quite annoying. From the looks of it, it doesn't seem to hurt the grammar if you made it possible to have variables called 'next', or am I wrong here?
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12960
  • Karma: 378
Re: [BUG] Using variable called 'next' in a Type fails
« Respuesta #7 en: Diciembre 05, 2008, 12:53:57 am »
sorry... use _next
Download Lastest BennuGD Release: http://www.bennugd.org/node/2