Home > database >  Written in VFP @ say statements supermarket, clothing store receipts machine printing (don't ne
Written in VFP @ say statements supermarket, clothing store receipts machine printing (don't ne

Time:09-27

Here only wrote print 8 items of example, if more can increase:
* print out receipts
SET the DEVICE TO print & amp; & Set from the printer output


* receipts format@ 1, 1 say "thank you for coming!" The font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 3, 3 say "romantic in a clothing store" the font 'Microsoft elegant black, 15 color RGB (0, 0)
@ 7, 1 say "date:" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 7, 7 say DATETIME () the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 8, 1 say "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -"
@ 9, 1 say "serial number number number unit price" the font 'Microsoft elegant black, 9 color RGB (0, 0)
X dy=12
XHJ=1
* print the first
@ 10, 1 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 10, 5 say thisform. Text10. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 10, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 10, 20 say thisform. Text18. Value the font "Microsoft black", 9 color RGB (0, 0)
* print the second
IF NOT the EMPTY (Value) thisform. Text11. Then
@ 11, 1 say "2" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 11, 5 say thisform. Text11. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 11, say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 11, 20 say thisform. Text19. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF

* print the third thing
IF NOT the EMPTY (Value) thisform. Text12. Then
@ 12, 1 say "3" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 12, 5 say thisform. Text12. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 12, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 12, 20 say thisform. Text20. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF
* print 4 pieces of
IF NOT the EMPTY (Value) thisform. Text13. Then
@ 13, 1 say "4" the font 'Microsoft elegant black, 9 color RGB (0, 0)
13, 5 say @ thisform. Text13. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 13, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
13, 20 say @ thisform. Text21. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF

* print 5 pieces
IF NOT the EMPTY (Value) thisform. Text14. Then
@ 14, 1 say "5" the font 'Microsoft elegant black, 9 color RGB (0, 0)
14, 5 say @ thisform. Text14. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 14, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
14, 20 say @ thisform. Text22. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF
* print 6 pieces
IF NOT the EMPTY (Value) thisform. Text15. Then
@ 15, 1 say "6" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 15, 5 say thisform. Text15. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 15, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 15, 20 say thisform. Text23. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF
* print 7 pieces of
IF NOT the EMPTY (Value) thisform. Text16. Then
@ 16, 1 say "7" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 16, 5 say thisform. Text16. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 16, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 16, 20 say thisform. Text24. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF

* print 8 pieces of
IF NOT the EMPTY (Value) thisform. Text17. Then
@ 17, 1 say "8" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 17, 5 say thisform. Text17. Value the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 17, 18 say "1" the font 'Microsoft elegant black, 9 color RGB (0, 0)
@ 17, 20 say thisform. Text25. Value the font "Microsoft black", 9 color RGB (0, 0)
X dy=x dy + 1
XHJ=XHJ + 1
ENDIF

@ x dy, 1 say "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -"
@ + 1, 1 x dy say "combined meter:" the font "Microsoft black", 10 color RGB (0, 0)
@ x dy + 1, 8 say STR (XHJ, 1, 0) the font 'Microsoft elegant black, 10 color RGB (0, 0)
@ x dy + 1, say "a" font "Microsoft black", 10 color RGB (0, 0)
Total @ x dy + 1 2 say ":" the font "Microsoft black", 10 color RGB (0, 0)
@ + 1, x dy say thisform. Label31. Caption font "Microsoft black", 10 color RGB (0, 0)
@ x dy + 1, 27 say "yuan" font "Microsoft black", 10 color RGB (0, 0)
@ + 3, 1 x dy say "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -"
The Set printer to

CodePudding user response:

These grammar, like FOXBASE + the s!

CodePudding user response:

reference 1st floor yrt888 response:
these grammar, like FOXBASE + the s!

What seems to be, is meant to be!

CodePudding user response:

Cats don't see black and white and syntax to watch
s good condition
Add the old order, sometimes need:
@ & lt; Row and column & gt; [SAY & lt; expression & gt;] [PICTURE & lt; format character & gt;] [COLOR & lt; COLOR & gt;]
Function: the screen output according to the results, the specified coordinates to the
PICTURE description code and significance
A: only allow letter
L: only allow logical data
N: allow only letters and Numbers
X: allows any character
Y: only allow Y, N, Y, N, and Y, N, respectively is converted to Y, N
9: the numerical data for character data is only allowed figure only allow Numbers and plus or minus
# : allow Numbers, Spaces, plus or minus
! : transform the lowercase letters converted to uppercase characters
$: display currency number
* : display in front of the numeric value
. : point out the position of the decimal point
, : on the left side of the decimal point, and used in the digital space

@ & lt; Row and column & gt; SAY & lt; Bitmap file name & gt; BITMAP & lt; Universal field name & gt; [ISOMETRIC | STRETCH] [the SIZE & lt; numerical expression 1 & gt;, & lt; numerical table of type 2 & gt;] [NOWAIT]
Function: the bitmap file or general fields displayed in the specified line, the location of the column
Description: 1) ISOMETRIC said zoom pictures, adapt its proportion to the size of the designated area
2) STRETCH said in horizontal two vertical direction zoom pictures,
3) [SIZE & lt; numerical expression 1 & gt;, & lt; numerical expression 2 & gt;] Used to specify the size of the images, & lt; A numerical expression 1 & gt; As the height, & lt; A numerical expression 2 & gt; For the width of the
4) [NOWAIT] said at execution time does not wait for

CodePudding user response:

Foxpro command under the foxbase compatible, almost all use pure code method is faster,
  •  Tags:  
  • VFP
  • Related