get_flag versus get_sdf
Author | Topic: get_flag versus get_sdf |
---|---|
Infiltrator
Member # 5576
|
written Saturday, June 16 2007 18:56
Profile
Homepage
Some while ago we had a discussion of the usage of these two supposedly identical calls. There was some feeling that get_sdf was somehow less trustworthy, although I was not able to identify why. Does anyone know of any actual differences between them, or are they really just the same as they should be? -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |
Shaper
Member # 7472
|
written Saturday, June 16 2007 19:30
Profile
Homepage
By all rights, the both appear to function exactly alike. However, I have had get_sdf kick out an error now and then for no particular reason. -------------------- Scenarios need reviews! Please rate these scenarios at the CSR after playing them! Amnesia • Witch Hunt • Where the Rivers Meet • Foul Hordes Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Guardian
Member # 6670
|
written Saturday, June 16 2007 19:36
Profile
Homepage
For consistency, I'd use get_flag, because there is no set_sdf or inc_sdf, just set_flag and inc_flag. I think JV just uses get_flag. EDIT: According to the Wikibook reference: quote:So I'm guessing JV just had get_sdf to begin with, then added get_flag for consistency, leaving get_sdf just in case some of his code still referenced it. -------------------- Do not use for drying pets. - Warning label on a microwave [ Saturday, June 16, 2007 19:38: Message edited by: Dintiradan ] Posts: 1509 | Registered: Tuesday, January 10 2006 08:00 |
Lifecrafter
Member # 6193
|
written Saturday, June 16 2007 19:42
Profile
Homepage
I'd never heard of (or experienced) problems with get_sdf. Then again I've never used it or seen anyone else use it. I've used get_flag from the start, pretty much for the reasons Dintiradan just said-- using set_flag and get_sdf is just stupid (Plus for some reason flag seems easier to type than sdf. Which makes no sense since it has an extra character-- maybe it's more natural for me since it's a real word?) -------------------- Guaranteed to blow your mind. Frostbite: Get It While It's...... Hot? Posts: 900 | Registered: Monday, August 8 2005 07:00 |