The default value should go in the Declare. If the intended default value doesn't appear in code before you call the function, then FB won't think it has a default value, and will require the parameter.

In the Declare, you should keep the byref/byval as well, but the parameter name can be omitted. E.g. "declare sub delay(byref as double = 1)"

I would advise putting the default value only in the Declare if you have one, so it's only in one place in the code. I don't know what will happen if you have different default values in the Declare and the header.

PS. Does the parameter need to be Byref? "Delay" doesn't sound like the kind of sub that modifies its parameter. If you're not changing it, Byval would be better here.