|
432 | 432 | <{lfor}>, <{lwhile}>, <nnext>, <rec>, <.rest.>, <.noopt.>; |
433 | 433 | ) |
434 | 434 |
|
435 | | -#command SUM <x1> [, <xn>] TO <v1> [, <vn>] ; |
| 435 | +#command SUM <x1> [, <xn>] ; |
436 | 436 | [FOR <lfor>] ; |
437 | 437 | [WHILE <lwhile>] ; |
438 | 438 | [NEXT <nnext>] ; |
439 | 439 | [RECORD <rec>] ; |
440 | | - [<rest:REST>] ; |
| 440 | + [<REST:REST>] ; |
441 | 441 | [<noopt: NOOPTIMIZE>] ; |
442 | | - [ALL] ; |
| 442 | + [all] ; |
| 443 | + TO <v1> [, <vN>] ; |
443 | 444 | ; |
444 | | - => <v1> := [ <vn> := ] 0 ; |
| 445 | + => <v1> := [ <vN> := ] 0 ; |
445 | 446 | ; DbEval( ; |
446 | | - {|| <v1> += <x1> [, <vn> += <xn> ]}, ; |
| 447 | + {|| <v1> += <x1> [, <vN> += <xn> ]}, ; |
447 | 448 | <{lfor}>, <{lwhile}>, <nnext>, <rec>, <.rest.>, <.noopt.>; |
448 | 449 | ) |
449 | 450 |
|
450 | | -#command AVERAGE [<x1> [, <xn>] TO <v1> [, <vn>]] ; |
| 451 | +#command AVERAGE [<x1> [, <xn>] ; |
451 | 452 | [FOR <lfor>] ; |
452 | 453 | [WHILE <lwhile>] ; |
453 | 454 | [NEXT <nnext>] ; |
454 | 455 | [RECORD <rec>] ; |
455 | 456 | [<rest:REST>] ; |
456 | 457 | [<noopt: NOOPTIMIZE>] ; |
457 | | - [ALL] ; |
| 458 | + [all] ; |
| 459 | + TO <v1> [, <vN>]] ; |
458 | 460 | ; |
459 | 461 | => M->__Avg := <v1> := [ <vn> := ] 0 ; |
460 | 462 | ; |
|
487 | 489 | #command SET MEMOBLOCKSIZE TO => RDDInfo(_SET_MEMOBLOCKSIZE, 512) |
488 | 490 | #command SET OPTIMIZE <x:ON,OFF,&> => RDDInfo(_SET_OPTIMIZE, <(x)>) |
489 | 491 |
|
| 492 | +#command COPY MEMO <field> TO <(file)> <add:ADDITIVE> [AS <nCP>] ; |
| 493 | + => DbCopyMemo( <"field">, <(file)>, <ADD>[, <nCP>] ) |
| 494 | + |
| 495 | +// REPLACE ... [ADDITIVE] � without IN clause |
| 496 | +#command REPLACE <(f1)> WITH <x1> [<add1:ADDITIVE>] ; |
| 497 | + [, <(fn)> WITH <xn> [<addn:ADDITIVE>]] ; |
| 498 | + [FOR <lfor>] [WHILE <lwhile>] [NEXT <nnext>] [RECORD <rec>] ; |
| 499 | + [<REST:REST>] [<noopt:NOOPTIMIZE>] [all] ; |
| 500 | + => DbEval( ; |
| 501 | + {|| DbAutoLock(), ; |
| 502 | + __FieldSetAdd(<(f1)>, <x1>, <.add1.>) ; |
| 503 | + [, __FieldSetAdd(<(fn)>, <xn>, <.addn.>)], ; |
| 504 | + DbAutoUnLock() }, ; |
| 505 | + <{lfor}>, <{lwhile}>, <nnext>, <rec>, <.rest.>, <.noopt.> ; |
| 506 | + ) |
| 507 | + |
| 508 | +// REPLACE ... [ADDITIVE] IN workarea � defined LAST, tried FIRST |
| 509 | +#command REPLACE <(f1)> WITH <x1> [<add1:ADDITIVE>] ; |
| 510 | + [, <(fn)> WITH <xn> [<addn:ADDITIVE>]] ; |
| 511 | + [FOR <lfor>] [WHILE <lwhile>] [NEXT <nnext>] [RECORD <rec>] ; |
| 512 | + [<REST:REST>] IN <(wa)> [<noopt:NOOPTIMIZE>] [all] ; |
| 513 | + => __VfpReplaceIn( <(wa)>, ; |
| 514 | + {|| DbAutoLock(), ; |
| 515 | + __FieldSetAdd(<(f1)>, <x1>, <.add1.>) ; |
| 516 | + [, __FieldSetAdd(<(fn)>, <xn>, <.addn.>)], ; |
| 517 | + DbAutoUnLock() }, ; |
| 518 | + <{lfor}>, <{lwhile}>, <nnext>, <rec>, <.rest.>, <.noopt.> ; |
| 519 | + ) |
490 | 520 |
|
491 | 521 | #endif // DBCMD_XH |
492 | 522 |
|
|
0 commit comments