For Programmers: Free Programming Magazines  


Home > Archive > Clipper > March 2006 > Big numbers on screen in clipper 5.2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Big numbers on screen in clipper 5.2
Damir Crnkovic

2006-03-29, 7:55 am

How to @..,..SAY a big numbers on screen like a POS computers on shop?
Do you all make a your own custom function or is in some libraries
allready made function? I need it for school.
Thanks
Damir

+-----
+ bedemgradREMOVE@os.t-com.hr
+ remove REMOVE from mail
+-----
Robert J. Stuart

2006-03-29, 7:55 am

I have a custom function I wrote that will display upto 4 digit number in
full screen.

Bob S.

"Damir Crnkovic" <bedemgrad.makni@os.t-com.hr> wrote in message
news:e0dlu4$4l7$1@ss405.t-com.hr...
> How to @..,..SAY a big numbers on screen like a POS computers on shop?
> Do you all make a your own custom function or is in some libraries
> allready made function? I need it for school.
> Thanks
> Damir
>
> +-----
> + bedemgradREMOVE@os.t-com.hr
> + remove REMOVE from mail
> +-----



fatfat

2006-03-29, 6:55 pm

big display for numeric up to 10 digit

function bigdisp(t_in,i_row)
private i, j
a_digit= { {' óióiói ', ' ói ói ', ' ói ói ', ' ói ói ', ' óióiói '}, ;
{' óiói ', ' ói ', ' ói ', ' ói ', ' óióiói '}, ;
{' óióiói ', ' ói ', ' óióiói ', ' ói ', ' óióiói '}, ;
{' óióiói ', ' ói ', ' óiói ', ' ói ', ' óióiói '}, ;
{' ói ói ', ' ói ói ', ' óióiói ', ' ói ', ' ói '}, ;
{' óióiói ', ' ói ', ' óióiói ', ' ói ', ' óióiói '}, ;
{' óióiói ', ' ói ', ' óióiói ', ' ói ói ', ' óióiói '}, ;
{' óióiói ', ' ói ', ' ói ', ' ói ', ' ói '}, ;
{' óióiói ', ' ói ói ', ' óióiói ', ' ói ói ', ' óióiói '}, ;
{' óióiói ', ' ói ói ', ' óióiói ', ' ói ', ' óióiói '}, ;
{' ', ' ', ' ', ' ', ' ói '}, ;
{' ', ' ', ' ', ' ', ' '}, ;
{' ', ' ', ' óióiói ', ' ', ' '} }
for i = 1 to 10
t_chr = substr(t_in,i,1)
t_pos = at(t_chr,'0123456789. -')
t_row = i_row
for j = 1 to 5
@ f_row(), (i-1)*8 say a_digit[t_pos, j]
next
next

"Damir Crnkovic" <bedemgrad.makni@os.t-com.hr>
???????:e0dlu4$4l7$1@ss405.t-com.hr...
> How to @..,..SAY a big numbers on screen like a POS computers on shop? Do
> you all make a your own custom function or is in some libraries allready
> made function? I need it for school.
> Thanks
> Damir
>
> +-----
> + bedemgradREMOVE@os.t-com.hr
> + remove REMOVE from mail
> +-----



Mahanimann

2006-03-29, 6:55 pm

You'll find what you are looking for in Vern Six Clipper Toolbox. ...and in
two sizes as well (big and extra big). I bet you'll find it on
http://www.the-oasis.net/. Vern Six Basic Lib also has a big text function
(not 99% sure). Both libs are very well written, freeware and with source
included.

Mahanimann
Norway

"Damir Crnkovic" <bedemgrad.makni@os.t-com.hr> skrev i melding
news:e0dlu4$4l7$1@ss405.t-com.hr...
> How to @..,..SAY a big numbers on screen like a POS computers on shop? Do
> you all make a your own custom function or is in some libraries allready
> made function? I need it for school.
> Thanks
> Damir
>
> +-----
> + bedemgradREMOVE@os.t-com.hr
> + remove REMOVE from mail
> +-----



GWood

2006-03-29, 6:55 pm

Just our of curiosity, what school is still using Clipper as a teaching
tool? I developed and taught an Intro Programming course at the local
Community College using Clipper back in the 80's. It had been displaced by
more "current" languages within a few years.

p.s. I hope this group hasn't inadvertently done your homework for you. !!

"Damir Crnkovic" <bedemgrad.makni@os.t-com.hr> wrote in message
news:e0dlu4$4l7$1@ss405.t-com.hr...
> How to @..,..SAY a big numbers on screen like a POS computers on shop?
> Do you all make a your own custom function or is in some libraries
> allready made function? I need it for school.
> Thanks
> Damir
>
> +-----
> + bedemgradREMOVE@os.t-com.hr
> + remove REMOVE from mail
> +-----



Marek Horodyski

2006-03-30, 6:55 pm


U¿ytkownik "fatfat" <fatfat@fatfat.com> napisa³ w wiadomoœci
news:442a9058$1_2@rain.i-cable.com...
> big display for numeric up to 10 digit
>

[ ... ]

> @ f_row(), (i-1)*8 say a_digit[t_pos, j]



What is f_row() ?

Regards,
Marek Horodyski

Damir Crnkovic

2006-03-30, 6:55 pm

GWood wrote:
> Just our of curiosity, what school is still using Clipper as a teaching
> tool? I developed and taught an Intro Programming course at the local
> Community College using Clipper back in the 80's. It had been displaced by
> more "current" languages within a few years.
>

Gwood, in my country (Croatia) a school sistem is based on old hardware
and software, most of this is donation. For a seminar, we need to make a
little Point Of Sale application. Clipper and Dbasee is only we have for
work with a database and my father was work with Clipper in the 90's so
he will try to help as.
> p.s. I hope this group hasn't inadvertently done your homework for you. !!
>

I hope so too
> "Damir Crnkovic" <bedemgrad.makni@os.t-com.hr> wrote in message
> news:e0dlu4$4l7$1@ss405.t-com.hr...
>
>

Stupar

2006-03-30, 6:55 pm

/*
Author....: Stupar (c) 1997-1999

Version...: Clipper 5.x
Compile...: /a /m /n /w /l

****************************************
**************************************/
#xcommand DEFAULT <v1> TO <x1> [, <vn> TO <xn> ] ;
=> IF <v1> == NIL ; <v1> := <x1> ; END ;
[; IF <vn> == NIL ; <vn> := <xn> ; END ]

function Test()

local nTestNum:=12345678.90
cls

BigNum( nTestNum, 0, 5, 2, 39 ) ; BigNum( -nTestNum, 0, 5, 40, 79, )
BigNum( nTestNum, 1, 10, 2, 39 ) ; BigNum( -nTestNum, 1, 10, 40, 79, )
BigNum( nTestNum, 2, 15, 2, 39 ) ; BigNum( -nTestNum, 2, 15, 40, 79, "@E 999,999.99" ) // namjerno mala slika
BigNum( nTestNum, 3, 20, 2, 39,"999999999" ) ; BigNum( -nTestNum/100, 3, 20, 40, 79, "" )

InKey(0)

return nil

/*-----------------------------------------------------------------------------
Rezultat : NIL
Namena : Ispis cena, iznosa... velikim brojkama
---------*/

FUNCTION BigNum( nBroj, nNumType, nRowTop, nColLeft, nColRight, cPicture, cColor )

local aChars:={}, nPos, i:=0, n:=0, nLen:=0
local Line1:="", Line2:="", Line3:="" , znak:="", cBroj:=""

DEFAULT nNumType TO 1
DEFAULT nColLeft TO 1
DEFAULT nRowTop TO MaxRow() - 4
DEFAULT nColRight TO MaxCol() - 1
DEFAULT cPicture TO "@E 999,999,999.99"
DEFAULT cColor TO "GR+/N*"

nLen :=nColRight - nColLeft
cBroj:=Transform(nBroj, cPicture)
// if Len(cBroj) > nLen/3
// nNumType := -1
// end

// 44 45 46 47 48 ..... ..... 57

aChars:={" ", ",", "-", ".", "/", "0","1","2","3","4","5","6","7","8","9" }
nLen :=Len(aChars)

do case
case nNumType == 1
Line1:= {" "," "," "," "," ","ÚÄ¿"," ¿ ","ÚÄ¿","ÚÄ¿","Â Â","ÚÄ ","ÚÄ¿","ÚÄ¿","ÚÄ¿","ÚÄ¿"}
Line2:= {" "," ","ÄÄ "," ","/","³ ³"," ³ ","ÚÄÙ"," Ä´","ÀÄ´","ÀÄ¿","ÃÄ¿"," ³","ÃÄ´","ÀÄ´"}
Line3:= {" ",","," ","."," ","ÀÄÙ"," Á ","ÀÄÙ","ÀÄÙ"," Á","ÀÄÙ","ÀÄÙ"," Á","ÀÄÙ","ÀÄÙ"}
case nNumType == 2
Line1:= {" "," "," "," "," ","ÉÍ>"," > ","ÉÍ>","ÉÍ>","Ë Ë","ÉÍ ","ÉÍ>","ÉÍ>","ÉÍ>","ÉÍ>"}
Line2:= {" "," ","ÍÍ "," ","/","º º"," º ","ÉÍ¥"," ͱ","Èͱ","ÈÍ>","ÌÍ>"," º","Ìͱ","Èͱ"}
Line3:= {" ","g"," ","o"," ","ÈÍ¥"," Ê ","ÈÍ¥","ÈÍ¥"," Ê","ÈÍ¥","ÈÍ¥"," Ê","ÈÍ¥","ÈÍ¥"}
case nNumType == 3
Line1:= {" "," "," "," "," ","ÜÜÜ "," Ü ","ÜÜÜ ","ÜÜÜ ","Ü Ü ","ÜÜÜ ","ÜÜÜ ","ÜÜÜ ","ÜÜÜ ","ÜÜÜ "}
Line2:= {" "," ","ÜÜ "," ","/ ","Û Û ","ßÛ ","ÜÜÛ ","ÜÜÛ ","ÛÜÛ ","ÛÜÜ ","ÛÜÜ "," Û ","ÛÜÛ ","ÛÜÛ "}
Line3:= {" ","Û "," ","Ü "," ","ÛÜÛ ","ÜÛÜ ","ÛÜÜ ","ÜÜÛ "," Û ","ÜÜÛ ","ÛÜÛ "," Û ","ÛÜÛ ","ÜÜÛ "}
otherwise
Line1:=Array(nLen) ; AFill(Line1, " ")
Line2:=aChars
Line3:=Array(nLen) ; AFill(Line3, " ")
endcase

nLen :=Len( cBroj )
n :=0

// PUSH VIDEO
SET COLOR TO (cColor)

FOR i := nLen TO 1 step -1

znak := SubStr(cBroj, i, 1)
nPos := AScan(aChars, znak ) ; if nPos == 0 ; nPos := 3 ; end

n += Len(Line1[nPos])
if nColRight - n >= nColLeft
@ nRowTop+0, nColRight-n SAY Line1[nPos]
@ nRowTop+1, nColRight-n SAY Line2[nPos]
@ nRowTop+2, nColRight-n SAY Line3[nPos]
elseif !Empty(Line2[nPos])
@ nRowTop+1, nColLeft SAY PadL(cBroj, nColRight-nColLeft) color ("*"+cColor) // Replicate("X", n)
i := 0 // exit
end

NEXT
// POP VIDEO

RETURN ( cBroj )



Stupar

2006-03-30, 6:55 pm


----- Original Message -----
From: "Damir Crnkovic" <bedemgrad.makni@os.t-com.hr>
Newsgroups: comp.lang.clipper
Sent: Thursday, March 30, 2006 6:23 PM
Subject: Re: Big numbers on screen in clipper 5.2

[color=darkred]
> GWood wrote:
> Gwood, in my country (Croatia) a school sistem is based on old hardware
> and software, most of this is donation. For a seminar, we need to make a
> little Point Of Sale application. Clipper and Dbasee is only we have for
> work with a database and my father was work with Clipper in the 90's so
> he will try to help as.


Evo Damire neke moje rutine za VELIKE brojeve:

Pozdrav iz biv¹e YU


fatfat

2006-03-30, 9:55 pm

just to increase t_row by 1

"Marek Horodyski" <m.horodyski@pzuzycie.com.pl>
???????:e0h00k$ikr$1@nemesis.news.tpi.pl...
>
> U¿ytkownik "fatfat" <fatfat@fatfat.com> napisa³ w wiadomoœci
> news:442a9058$1_2@rain.i-cable.com...
> [ ... ]
>
>
>
> What is f_row() ?
>
> Regards,
> Marek Horodyski
>



Damir Crnkovic

2006-03-31, 3:55 am

Stupar wrote:
> ----- Original Message -----
> From: "Damir Crnkovic" <bedemgrad.makni@os.t-com.hr>
> Newsgroups: comp.lang.clipper
> Sent: Thursday, March 30, 2006 6:23 PM
> Subject: Re: Big numbers on screen in clipper 5.2
>
>
>
>
> Evo Damire neke moje rutine za VELIKE brojeve:
>
> Pozdrav iz biv¹e YU
>
>


E, svaka ti dala!
Ovim amerima izgleda nije jasno kakav je ¹kolski sistem na ovim
prostorima (ne grcaju ¹kole u lovi). A, na kraju krajeva, lak¹e mi je
ne¹to napraviti kad mi stari pomogne (dodu¹e, radio je nekada davno u
Clipperu) a ja æe to preraditi u Pascal.
Pozdrav iz Na¹ica.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com