End Function BUG

Started by Marc van Cauwenberghe, December 09, 2009, 06:04:33 AM

Previous topic - Next topic

Marc van Cauwenberghe

This can be very difficult to catch and it happened to a few times.
Just add a function in a module without the 'End Function' part. FF3 crashes.


Function DoSomething (lLong As Long) As String
   lTel& = lTel1
   Function = "crash"

Rolf Brandt

I think a feature like in the SED editor would be a good idea. If you finish a line with Function () or sub it automatically adds End Function or End Sub.

Personally when I write a Function line I always add right away the End Function line. Similar I do this with If.., Select Case, etc.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Andy Flowers

It would be a good idea to automatically add the End Function.

I've had a few crashes with this as well. Now I learned to add the End Function as soon as I create the function.

Marc van Cauwenberghe


It would indeed be nice, but nevertheless FF3 should not crash.

Marc

Paul Squires

Hi Marc,

That is a tough error to catch because the error occurs based on the main file rather than in the actual form/module file where the missing END SUB or END FUNCTION occurs. This is because those files are #INCLUDE'd in the main source file for code generation and code compilation purposes.

I have added a specific error check for Error 454 and Error 458. You will no longer get a GPF or positioning of the editor to the FF_WinMain or FF_PumpHook functions.

The fix will be in v3.05.

Paul Squires
PlanetSquires Software

Paul Squires

I have also opened a ticket for a new feature request to automatically append an END FUNCTION or END SUB after a Sub/Function line is created. Basically, the same functionality that exists in FF2.
Paul Squires
PlanetSquires Software