Re: [fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-26 Thread mokashe.ram
Ok Thanks  , Tomas 



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Can-We-use-CRT-and-Video-Unit-in-Single-Unit-In-free-pascal-tp5719636p5719654.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-26 Thread mokashe.ram
Thanks Jeff



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Can-We-use-CRT-and-Video-Unit-in-Single-Unit-In-free-pascal-tp5719636p5719655.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-23 Thread mokashe.ram
HI,
  Can We use CRT and Video Unit in Single Unit Simulteneously...

Thanks
SUD



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Can-We-use-CRT-and-Video-Unit-in-Single-Unit-In-free-pascal-tp5719636.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-23 Thread Jonas Maebe

On 23 Jun 2014, at 09:45, mokashe.ram wrote:

  Can We use CRT and Video Unit in Single Unit Simulteneously...

That is documented: http://www.freepascal.org/docs-html/rtl/video/ (the remark 
at the bottom of the page)


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-23 Thread Tomas Hajny
On Mon, June 23, 2014 09:51, Jonas Maebe wrote:
 On 23 Jun 2014, at 09:45, mokashe.ram wrote:

  Can We use CRT and Video Unit in Single Unit Simulteneously...

 That is documented: http://www.freepascal.org/docs-html/rtl/video/ (the
 remark at the bottom of the page)

While Jonas is correct that this combination is neither recommended nor
officially supported (among others due to the fact that this combination
would not work on some of FPC supported platforms), it _does_ work for
some other platforms as already mentioned on this list in another thread
also started by you (see
http://lists.freepascal.org/pipermail/fpc-pascal/2014-May/041991.html).

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-23 Thread Tomas Hajny
On Mon, June 23, 2014 12:09, mokashe.ram wrote:


Hi,

  Thanks for your help.
   I have Gone throgh the previous post,
  (In)compatibility of units Video and Crt is platform
(implementation)
  specific thing. They can be used together without any issues on
 platforms
  providing sufficient access to the console.
*it means i cann't use write/Writeln function using video unit*
 i just want to check at particular screen location value exist or not using
 Videobuf ( ex. If VideoBuf[Offset  ' ' Then Begin ...End]) . i can
check
 but i cannt use any crt function with VideoBuf.

Indeed, you should not mix access to the console using Crt.Write(Ln) with
access via Video.VideoBuf^. On the other hand, you can use Video.VideoBuf^
together with keyboard related functions from unit Crt (with the caveat
that it would work on e.g. Win32 but not e.g. on Linux).

Vice versa, you may be able to use functionality provided by unit Video
for changing the console resolution (under Win32) together with
Crt.Write(Ln) as long as you re-initialize the window coordinates
(Crt.Window) after Video.SetVideoMode and before any Crt.Write(Ln).

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Can We use CRT and Video Unit in Single Unit In free pascal

2014-06-23 Thread DaWorm
Or you can do the right thing and not use the contents of the video memory
as if it were a variable to be used to check if you have or have not done a
particular thing, which is what it looks like your original code does.

This would require understanding more of what the program you are porting
was intended to do and less of how it did it.  Once you have that, so many
questions answer themselves.

Jeff.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal