Home   Help Search Login Register  

Author Topic: Bunch of functions  (Read 2285 times)

0 Members and 1 Guest are viewing this topic.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Bunch of functions
« on: 13 Jul 2009, 20:47:55 »
Here's a bunch of functions I wrote for ArmA over the past few months. They are untested, undocumented and might does contain horrible bugs. I've tried to keep the code as clean, simple and readable as possible. Since I won't finish this project I decided to release the raw stuff. Maybe someone finds it useful...

Licence: MIT


Edit: I found a newer version which looks less buggy. Also found some "test cases" for Str, Queue and RingBuffer (see "_test.sqf"). A small test leads to the assumption that at least the functions used there are working properly.
« Last Edit: 14 Jul 2009, 01:37:05 by Worldeater »
try { return true; } finally { return false; }

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Bunch of functions
« Reply #1 on: 13 Jul 2009, 21:11:34 »
Thanks WorldEater.  These do look useful.

I suspect you had a test mission or two that helped you debug these functions.  Is that something you can share too?   

A working example always helps me understand better....

I understand this is an unsupported release, so no worries if not.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Bunch of functions
« Reply #2 on: 13 Jul 2009, 21:49:27 »
Nope, sorry. I've used a single SQF to test the functions as I wrote them and it changed constantly. The planed unit tests were never finished... :(

But take a look at the "_this select" lines at the top of the functions. Most of the variables names are self-documenting (well, at least I hope they are). The RingBuffer and Queue structures are "documented" in the corresponding func_*New functions.

If you plan to use these functions for A2, don't! Use CBA instead!
try { return true; } finally { return false; }