Betascript Publishing CRiSP File Editor 6 Manual de usuario Pagina 28

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 92
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 27
Page 28
binary | l -> r
binary && l -> r
binary || l -> r
ternary ?: r -> l
binary = += -= *= /= %= >>= <<= &= ^= |= r -> l
binary , l -> r
--------------------------------------------------------------
From K&R, p 49
In the above table, the following are not supported: ->, . (dot), (type), sizeof. Also, crunch does not support
structures, unions, pointers, or explicit dereferencing.
Crunch supports a fair amount of automatic type co-ercion. The following table lists the coercion rules when
used with the arithmetic operators only. (Type coercion is not performed for function arguments). The prefix
character is used to identify the type of the variable or expression - i = integer, f = float, l = list, s = string, a =
any type. sym is used to denote a symbol of the specified type; expr is used to denote an expression
evaluating to the specified type. (Note that these conversions are implicit -- the typecast on the right hand
side is not a supported feature, currently).
isym op= fexpr => iexpr op= (int) fexpr
fsym op= iexpr => fsym op= (double) iexpr
lsym += aexpr => append aexpr to end of lsym
fsym++ => fsym += 1.0
fsym-- => fsym -= 1.0 etc..
iexpr op fexpr => (double) iexpr op fexpr
fexpr op iexpr => fexpr op (double) iexpr
iexpr + sexpr => "iexpr + sexpr"
(string concatenation)
fexpr + sexpr => "fexpr + sexpr"
(string concatenation)
aexpr + lexpr => new list with aexpr at front
Basically, a string plus a number (or vice versa) converts the number to a string and performs string
concatenation. A list plus any type creates a new list by concatenating list and value. An integer and floating
point value when combined results in a floating point value. Using these rules, a value of one type can easily
be converted to a value in another type:
string s;
int ival;
ival = 99;
s = "Value: " + val + " brass monkeys";
/* s = "Value: 99 brass monkeys" */
ival = 1000000;
s = "Value: " + (0.0 + ival) + " big macs";
/* s = "Value: 1e+06 big macs" */
When converting floating point numbers to strings, the "%g" printf format specifier is used.
{button See Also, ALink(crunch,,,)}
Loop constructs: for, while, do
There are three main looping constructs, the for loop, the while, and the do loop. The for loop is a
generalised looping mechanism supporting the following syntax:
for ( init-expr ; while-expr ; post-expr )
statement
Vista de pagina 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 91 92

Comentarios a estos manuales

Sin comentarios

Car speakers manuals

Choose your Car speakers brand for download user manuals and guides

List of brands for manuals category Car speakers
Brands Top models
Sony                               XS-V1650G CDX-GS500R CDX-F5000C XAV-A1 Other categories
JVC                               CS-HX6845 CS-WD85 GET0260-003B CS-V4624 Other categories
Pioneer                               AVIC-X920BT TS-H1702 TS-WX205 FH-P8000BT Other categories
Kenwood                               DPX-3050 DPX404U KFC-HQ130 DEM-999D Other categories
JL Audio                               STEALTHBOX SB-F-TRKEXT/8W1 C2-525x Stealthbox SB-B-5SER/12W6v2 C3-570 Other categories
MB QUART                               RUA 216 Rua210 DKG 113 NLP254S Other categories
Panasonic                               CQ-C500U CQ-RG131U CQ-DF501 CQC5303N Other categories
Blaupunkt                               Acapulco MP54 US SYDNEY RCM 128 GTc 662 Mk II DM2000 Other categories
Alpine                               SPR-60 CDA-9856 SWD-2000 SPS-110TW Other categories
Kicker                               2011 KMT60 2011 KS Components KS350 2013 CS Coaxial Speakers Other categories
Audiovox                               P-94 US254 Prestige P950WESP HR7DDPKG Other categories
JBL                               GTO10200 GTO302 Vertec Series VT4880 GT7-5 Other categories
Clarion                               DXZ865MP DXZ758RMC DXZ768RMP bd239rg Other categories
Hyundai                               H-CSE694 H-CSA503 H-CST10A H-CSB603 Other categories
Philips                               21PT9457 CSP1000/55 FLAT TV 32PFL7603S/60 BDP7100/12 Other categories
Rockford Fosgate                               RFA-414 FNP2614U HPC2246 RFP-1415/1815 Other categories
Prology                               AT-1200 Club Silver CS-5.2C Neo-10 TX-6923 Other categories
Metra Electronics                               AW-560FD 99-8711 70-5512 99-8223S Other categories
Polk Audio                               GNX104-4 SR65006 EX3 Series DX3055 Other categories
Jensen                               MCD5112 VM9512 Mobile Multimedia AM/FM/DVD Receiver VM9510 PowerPlus 525 Other categories