From: daz Date: 2003-09-01T03:46:04+09:00 Subject: Re: ruby for IBM terminal emulation "{ vidya }" wrote: > hi, > > I am not sure if this is the right address to send my question ..so.. ! > > Is Ruby language a good choice for a terminal emulation software with > an IBM mainframe ? > i have to convert and port a terminal emulator currently in "C" lang > for communicating with the IBM mainframe. > It is in the MSWindows OS platform and i want to port it to the > Gnu/Linux OS platform but will it work if the client has another OS/s? > Would Ruby be a better option to C++ ? > thanks for your time, > I'd guess that your "C" program is making use of the getch() function (directy or indirectly). Because this isn't available with all compilers, Ruby uses getchar() which, under Win32, gets too much "help" from DOS (e.g. DOS echoes the characters as you type but doesn't return the input until getchar() sees end-of-line). I don't know *nix but I'm fairly sure this problem isn't there. So, a compiled-for-Win32 Ruby interpreter has this anomaly built-in. You can work-around by checking the Ruby platform in a script and calling Win32API but then you haven't got one script that will work for all. I would look at how easy it might be to convert the Win32 bits to more portable "C" and try ramming the prog. through a GNU compiler ? Use Ruby for your next project :-) daz