Dear friends,

I need to communicate and interact with a FORTRAN application via a Tk
     based user interface.

proc invokeQuads { } {
              set f [open |./quads r+]
foreach e {.f.a .f.b .f.c} {
             set entry [$e get]
                if { [string compare $entry ""] == 0 } {
                     puts stdout "Some entry(ies) are null .... enter
them Now \n"
                                     close $f
                                     return
                       } else {
                             puts $entry
                       }
              }


          flush $f   

 gets $f in_prompt  ;# Input the coefficients a,b,c
         gets $f disc       ;# DISC :     1.0000000000000
         gets $f iflag      ;# IFLAG =   0
         gets $f aux_msg    ;# ROOTS ARE REAL or ... Complex ...
         gets $f roots      ;# x1 =     2.0000000000000  x2 =    
1.0000000000000
         close $f           ;# now you can close

 set w .info.dum    ;# a quick fix - reassignment avoids the need to
declare
                            ;# w as a global

         if { [regexp {(COMPLEX|complex)} $aux_msg cmplx] == 1 } {
                       .zeros.x1 configure -text "Real Part"
             .zeros.x2 configure -text "Imaginary Part"
             $w.type config -text $aux_msg
         } else {
             .zeros.x1 configure -text x1
             .zeros.x2 configure -text x2
             $w.type config -text $aux_msg
              }

         regexp {(x1 = [ ]*[+|-]*[0-9]*\.[0-9]*)} $roots val1
         regexp {(x2 = [ ]*[+|-]*[0-9]*\.[0-9]*)} $roots val2

         .zeros.x1val configure -text $val1
         .zeros.x2val configure -text $val2
         $w.disc configure -text $disc
     }

When program calls this proc, after I input values. the values are
printed in terminal and the program stop. I need kill the process.

Thanks in advance for any help.

_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/vtcl-user

Reply via email to