Page 1 of 1
Ultimate Bug Fix Button
Posted: Sat Jul 14, 2012 1:32 am
by IdeasVacuum
Doesn't it drive you crazy when you can't fix your own bug?
What we really need is an enhancement to the PB IDE, a bug fix button which:
1) Completely removes the project from the computer;
2) Applies a System Restore to your brain, back to the time before you started the project, so you do not know you were working on it.

Re: Ultimate Bug Fix Button
Posted: Sat Jul 14, 2012 5:40 am
by idle
Code: Select all
Structure bottle
type.s
size.i
EndStructure
Procedure OpenBottle(bottle.s,ml)
Protected *obj.bottle
*obj = AllocateMemory(SizeOf(bottle))
*obj\size = ml
*obj\type = bottle
PrintN("Opening " + Str(ml) + " ml bottle of " + bottle)
ProcedureReturn *obj
EndProcedure
Procedure Drink(*drink.bottle,ml)
If *drink\size > 0
PrintN("glug glug glug")
*drink\size - ml
Delay(150)
ProcedureReturn 1
Else
PrintN("arrhhh")
ProcedureReturn 0
EndIf
EndProcedure
Procedure CloseBottle(*drink)
FreeMemory(*drink)
Delay(500)
EndProcedure
OpenConsole()
#PB_Whisky = "laphroaig"
file.s = ProgramParameter(0)
If FileSize(file.s)
;DeleteFile(file)
EndIf
*drink.bottle = OpenBottle(#PB_Whisky,750)
If *drink
While Drink(*drink,50)
Wend
CloseBottle(*drink)
EndIf
Re: Ultimate Bug Fix Button
Posted: Tue Jul 17, 2012 10:27 am
by akj
@idle:
I hope you realise that after drinking a full bottle of whisky, the program will be in no fit state to:
Far better for the program just to "crash out" instead.