1. Fast wprintf

This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C1F46B.7349A9D0
	charset="iso-8859-1"

--   Hello All.

-- I need very very fast print of values at same locations on screen =
like in example below, but this is=20
--  not enough for my application. Can somebody help me, with some other =
solution.
  =20
-- In this example I have cca 8200 turns per seconds on my Athlon 700MHz

include win32lib.ew
without warning
global constant win1 =3D create( Window, "Test win",0, 200, 200, 400, =
100,({WS_CAPTION, WS_SYSMENU}) )
global constant xax =3D create( CText, "", win1, 2, 2, 300, 12,0 )
global constant start =3D create( PushButton, "Start", win1, 16, 48, 60, =
20, 0 )
atom x_cur_pos,x_size,y_cur_pos,y_size,z_cur_pos,z_size,now
integer line,code

procedure on_click_start()
  x_cur_pos=3D1 y_cur_pos=3D1 z_cur_pos=3D1 x_size=3D0.0125 =
y_size=3D0.0125 z_size=3D0.0125 line=3D0 code=3D0
  now=3Dtime()
  while now+1 > time() do
 =20
  wPrintf( xax, "N: %06d G: %02d X:  %1.3f     Y:  %1.3f     Z:  %1.3f   =
      ",
  {line,code/100,x_cur_pos*x_size,y_cur_pos*y_size,z_cur_pos*z_size} )
 =20
  x_cur_pos+=3D1 y_cur_pos+=3D1 z_cur_pos+=3D1 line+=3D1 code+=3D1=20
  end while
 =20
  end procedure
  onClick[start] =3D routine_id( "on_click_start" )

procedure onPaint_xax( integer x1, integer y1, integer x2, integer y2 )
  setPenBkMode( xax, OPAQUE)
   end procedure
   onPaint[xax] =3D routine_id( "onPaint_xax" )

WinMain( win1, Normal )


                           -- Thanks

------=_NextPart_000_0015_01C1F46B.7349A9D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>--&nbsp;&nbsp; Hello All.</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-- I need very very fast print of =
values at same=20
locations on screen&nbsp;like in example below, but this is =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>--&nbsp; not enough for my application. =
Can=20
somebody help me, with some other solution.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- In this example I have cca 8200 =
turns per=20
seconds on my Athlon 700MHz</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>include win32lib.ew<BR>without =
warning<BR>global=20
constant win1 =3D create( Window, "Test win",0, 200, 200, 400, =
100,({WS_CAPTION,=20
WS_SYSMENU}) )<BR>global constant xax =3D create( CText, "", win1, 2, 2, =
300, 12,0=20
)<BR>global constant start =3D create( PushButton, "Start", win1, 16, =
48, 60, 20,=20
0 )<BR>atom =
x_cur_pos,x_size,y_cur_pos,y_size,z_cur_pos,z_size,now<BR>integer=20
line,code</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>procedure on_click_start()<BR>&nbsp; =
x_cur_pos=3D1=20
y_cur_pos=3D1 z_cur_pos=3D1 x_size=3D0.0125 y_size=3D0.0125 =
z_size=3D0.0125 line=3D0=20
code=3D0<BR>&nbsp; now=3Dtime()<BR>&nbsp; while now+1 &gt; time() =
do<BR>&nbsp;=20
<BR>&nbsp; wPrintf( xax, "N: %06d G: %02d X:&nbsp; =
%1.3f&nbsp;&nbsp;&nbsp;&nbsp;=20
Y:&nbsp; %1.3f&nbsp;&nbsp;&nbsp;&nbsp; Z:&nbsp;=20
%1.3f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ",<BR>&nbsp;=20
{line,code/100,x_cur_pos*x_size,y_cur_pos*y_size,z_cur_pos*z_size} =
)<BR>&nbsp;=20
<BR>&nbsp; x_cur_pos+=3D1 y_cur_pos+=3D1 z_cur_pos+=3D1 line+=3D1 =
code+=3D1 <BR>&nbsp; end=20
while<BR>&nbsp; <BR>&nbsp; end procedure<BR>&nbsp; onClick[start] =3D =
routine_id(=20
"on_click_start" )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>procedure onPaint_xax( integer x1, =
integer y1,=20
integer x2, integer y2 )<BR>&nbsp; setPenBkMode( xax, =
OPAQUE)<BR>&nbsp;&nbsp;=20
end procedure<BR>&nbsp;&nbsp; onPaint[xax] =3D routine_id( "onPaint_xax" =

)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>WinMain( win1, Normal )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;--=20

------=_NextPart_000_0015_01C1F46B.7349A9D0--

new topic     » topic index » view message » categorize

2. Re: Fast wprintf

----- Original Message -----
From: marijan.lopac1 at zg.hinet.hr
Subject: Fast wprintf



--   Hello All.

-- I need very very fast print of values at same locations on screen like in
example below, but this is
--  not enough for my application. Can somebody help me, with some other
solution.

-- In this example I have cca 8200 turns per seconds on my Athlon 700MHz

[And Derek replies]
Why? Nobody can read that fast so why bother displaying data that fast? What
problem is a fast display going to solve?

--------
Derek.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu