About Markish Expertise I can answer general questions related to Foxpro from Version 2.0 to 9.0. I'll try to answer them as quickly as possible.
Experience I've been into Dbase programming from age of 11. I've worked in versions from FoxPro 2.0 and Foxbase. Education/Credentials I've done my B.Tech (IT) with distinction from Anna University, Chennai - India.
Question I am using foxbase+ Rev 2.00 version
I need to generate random numbers in my record
IF user enter Rs.125000 For 100 Records and min value and
maximum value per records
System should generate Rs.125000 for 100 records with various numbers total should be exactly Rs.125000 for 100 records.
Please give me a code for generating random numbers
i tried with rand() function but it is not working in my version. I used clipper plink86 for convert prg file to exe file.
I need change font size or print in bold in Dot matrix printer by using command (Set devic to print)
Char() function is used for condensed mode
please tell me a function for changing font size or bold.
Eg. If i print bill company name should be print bold with big font size than the address.
reply me soon as possible
with regards,
L.sampath kumar
Answer Hi Sampath,
Sorry for the delay in my response. As far as I understand your question, you need to split some amount into some 100 records randomly. If that is the case you can use the following code.
mamt=125000 && Amount to be split
minamt=1000
maxamt=50000
use tableA
stor 0 to mnamt,tempamt
ct=1
count to trec
go top
do while !eof()
if ct<>tct
mnamt=INT((maxamt- minamt+ 1) * RAND( ) + minamt)
tempamt=tempamt+mamt
else
mnamt=mamt-tempamt
endif
repl amount with mnamt
ct=ct+1
skip
enddo
For changing the fonts in the printing, you need to use the escape control characters depending on your priter. You need to refer the hardware manual of the printer.