Silverfrost Forums

Welcome to our forums

Debugging an error in subroutine EDIT_MOVE_BOF@(iebinfo)

18 Dec 2008 5:37 #4110

I'm trying to use the subroutine EDIT_MOVE_BOF@(iebinfo) to move the cursor to the end of a string that's being displayed in a %eb box. When I declared and opened the edit box, I supplied an INTEGER array called iebinfo(24) for its edit info. The string displayed in the %eb box, is called statbuf, and is of CHARACTER*32000 type. The entire FORTRAN program is 5400+ lines long, yes really. The FORTRAN program file is called sim09wao.for . The subroutine in which the line CALL EDIT_MOVE_BOF@(iebinfo) exists, is called SUBROUTINE WRITSTAT .

It compiles and runs, but when it called the subroutine EDIT_MOVE_BOF@(iebinfo), I get an error message saying 'Integer divide by zero', and the following:

100430bc set_edit_hscroll_bar(<ptr>structÄedit_buffer)#70 [+004b] 10045d4e __edit_move_bof [+00af] WRITSTAT - in file sim09wao.for at line 5363 [+0270] MAIN - in file sim09wao.for at line 466 [+2582]

After this bombed out a few times, I put a WRITE statement just before the CALL EDIT_MOVE_BOF@(iebinfo) statement, that printed out the contents of the iebinfo array. The contents were:

0 1 2 4454599 96013 32000 4454599 (all other entries are 0)

Is there a way to find out exactly what the system is objecting to? I gather (guessing here) that one of the 0 entries in this edit-info array, should have been nonzero. But which one(s)? Where can I find a description of what each entry means? Entry 6 is obviously the length of the string being displayed. Darned if I know what the others mean.

I'd sure appreciate any hints or comments! Thanks!

18 Dec 2008 8:54 #4111

You will find details about the EDIT_INFO structure in the help file under Win32 Platform->ClearWin+->Edit box (%eb)->%N.Meb[options].

First you get the h_position etc.

The value that is causing the problem is not in the EDIT_INFO structure. It is calculated internally when the buffer is created so it looks like you are not initiating the control correctly.

If you can isolate the problem into a small program then we may be able to point out the error in your code or fix the associated ClearWin+ bug if there is one.

Please login to reply.