Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Logical expression from EditBox

vraz
Beginner
471 Views
Is there in Fortran dialog based application the possibility to read logical expression from the EditBox and evaluate it continuously in the cycle. Below is the example. In the EditBox could be given e.g. I.gt.25.

lret = DLGGET (dlg,IDC_EDIT_LOG,Beep_when)

Do I = 1,50
if (Beep_when) Call beepqq (100,100)
end do
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
471 Views
Something like CVF's Debug/Breakpoints/Condition... edit box, right?
You can take a look at Stuart Midgley's Function Parser, but as far as I know it deals only withnumerical functions, not logical ones -- you could probably adapt it to your needs by extending the list of operators (but it's not a trivial task).
Depending on how flexible you need your interface to be, it might be less error-prone and more obvious to the user to present him a combination of e.g. three controls: one combo-box presenting list of variables, one dropdown list containing possible operators (>, <, == etc.)and one spin-edit box with the numerical value. Of course, if the expression can be more complex, it's not appropriate approach.
Jugoslav
0 Kudos
Reply