Re: Help! "Out of Memory" errors with Appointments created from A

"Chris O''''Neill" <ChrisONeill@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
No need to hide under a rock. I really do appreciate your suggestions as
helps me learn.

Normally, I place all Dim's at the beginning of a subroutine, and I've
done that here too, but at that point I had the Dim's inside the IF/Then
statements so that they wouldn't occur unless the appointment was going to

You can't have conditional Dim statements in any flavour of VB or VBA. Even
though you place them inside If Then blocks, the compiler reads them and
allocates memory for the variables in it's first pass through the code, then
it compiles the code in another pass. So just where you place them inside a
procedure is irrelevant. That's why most developers place them at the start
of the procedure. That way they're conveniently grouped together, and you
might as well anyway (for the above reason).



Relevant Pages

  • Re: Is this a compiler error?
    ... First order of business is to change the 'pure' in the functions x, y, z, since this would give a compiler error or it should give a compiler error. ... subroutine initialize ... pure subroutine random_s ... It is very common that integer overflow is silent. ...
  • Re: DPROD issues
    ... a switch like that typically ... makes a compiler nonstandard in that mode. ... treatment of specific intrinsics is one ... subroutine sub1a ...
  • Re: Jumping into block of an if construct
    ... (For that matter a clever enough compiler could replace this PUT DATA ... routine which itself executes the loops around element handling. ... Either way I think the cost of element handling will usually ... So locally based on subroutine arguments, but not on, for example, ...
  • Re: Bus error/ segmentation fault--help?
    ... When I compile with the intel fortran compiler, ... This subroutine integrates the function y3 up one step, ... implicit double precision (a-h, o-z) ...
  • Re: Question about name conflicts in Fortran
    ... I am hacking the g95 compiler so that it dumps the structure ... Subroutine foo ... The para after the 2nd numbered list in 16.2 covers the case where the ... One of the exceptions is "a generic name may be the ...