6.3 BooleanExpressions
57
6.3 BooleanExpressions
Thebooleanexpressionscombinebooleanvalueswithlogicaloperations. Theybindweaker
thantherelationalexpressionswhichbindweakerthantheotherexpressions.
BoolExpr
-
!
-
PrimaryExpr
-
BoolExpr
-
?
-
BoolExpr
-
:
-
BoolExpr
-
BoolExpr
-
BinBoolOperator
-
BoolExpr
-
RelationalExpr
-
Theunary!operatornegatesaBoolean.ThebinaryBinBoolOperatorisoneoftheoperators
inTable6.3.Theternary?operatorisasimpleif-then-else: IftherstBoolExprisevaluated
^
LogicalXOR.True,ieithertherstorthesecond
Booleanexpressionistrue.
&&
||
LogicalANDandOR.Lazyevaluation.
&
|
LogicalANDandOR.Strictevaluation.
Table6.3:BinaryBooleanoperators,inascendingorderofprecedence
totrue,theoperatorreturnsthesecondBoolExpr,otherwiseitreturnsthethirdBoolExpr.
6.4 RelationalExpressions
The relational expressions compare entities of dierent kinds, mapping themto the type
boolean. They y are a middle between n the e boolean n type of f decisions s andthe other types.
Thebindstrongerthanthebooleanexpressionsbutweakerthanalltheothernon-boolean
expressions.
RelationalExpr
-
Expression
-
CompareOperator
-
Expression
-
TheCompareOperator isoneofthefollowingoperators:
<
<=
==
!=
>=
>
~~
Theirsemanticsaretypedependent.
Forarithmeticexpressionsonintandfloatordoubletypesthesemanticsisgivenby
Table6.4(byimplicitcastingtheycanalsobyusedwithallenumtypes).
Forexpressions onstringtypes lexicographicorderis usedfor comparisons,theexact
semanticsisgivenbyTable6.5.
Booleantypesandobjecttypessupportonlythe==andthe!=operators;onboolean
values theydenoteequivalenceandantivalence,andonobjecttypes they tellwhetherthe
referencesarethesame,thustheobjectsidentical.
Fortypeexpressionsthesemanticsofcompareoperatorsaregivenbytable6.6,therule
torememberis:typesgrowlargerwithextension/renement.Anexampleisgivenin6.7.
Pdf to jpeg converter - Convert PDF to JPEG images in C#.net, ASP.NET MVC, WinForms, WPF project
How to convert PDF to JPEG using C#.NET PDF to JPEG conversion / converter library control SDK
batch pdf to jpg; .pdf to jpg converter online
Pdf to jpeg converter - VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.net, ASP.NET MVC, WinForms, WPF project
Online Tutorial for PDF to JPEG (JPG) Conversion in VB.NET Image Application
convert pdf file into jpg; change pdf file to jpg file
58
BasicTypesandAttributeEvaluationExpressions
A == B
True,iAisthesamenumberasB.
A != B
True,iAisadierentnumberthanB.
A < < B
True,iAissmallerthanandnotequalB.
A > > B
True,iAisgreaterthanandnotequalB.
A <= B
True,iAissmallerthan(orequal)B.
A >= B
True,iAisgreaterthan(orequal)B.
Table6.4: Compareoperatorsonarithmeticexpressions
A == B
True,iAisthesamestringasB.
A != B
True,iAisnotthesamestringasB.
A < < B
True,itherstcharacterwhereAandBdierissmallerforA,orAisaprex
ofB.
A > > B
True,itherstcharacterwhereAandBdierissmallerforB,orBisaprex
ofA.
A <= B
True,itherstcharacterwhereAandBdierissmallerforA,orAisaprex
ofB,orAisthesameasB.
A >= B
True,itherstcharacterwhereAandBdierissmallerforB,orBisaprex
ofA,orBisthesameasA.
Table6.5:Compareoperatorsonstringexpressions
A == B
True, i A and B are identical. . Dierent t types s in n a type hierarchy are not
identical.
A != B
True,iAandBarenotidentical.
A < < B
True,iAisasupertypeofB,butAandBarenotidentical.
A > > B
True,iAisasubtypeofB,butAandBarenotidentical.
A <= B
True,iAisasupertypeofBorAandBareidentical.
A >= B
True,iAisasubtypeofBorAandBareidentical.
Table6.6:Compareoperatorsontypeexpressions
Online Convert PDF to Jpeg images. Best free online PDF JPEG
Online PDF to JPEG Converter. Download Free Trial. Convert a PDF File to JPG. Drag and drop your PDF in the box above and we'll convert the files for you.
best pdf to jpg converter for; bulk pdf to jpg converter online
C#: How to Use SDK to Convert Document and Image Using XDoc.
You may use our converter SDK to easily convert PDF, Word, Excel, PowerPoint, Tiff, and Dicom files to raster images like Jpeg, Png, Bmp and Gif.
conversion of pdf to jpg; pdf to jpeg converter
6.5 ArithmeticandBitwiseExpressions
59
NOTE(25)
A < < BcorrespondstothedirectionofthearrowinanUMLclassdiagram.
NOTE(26)
NodeandEdgearetheleastspecic,thusbottomelements?ofthetypehierarchy,
i.e.thefollowingholds:
 8n2Types
Node
:Node<=n
 8e2Types
Edge
:Edge<=e
6.5 ArithmeticandBitwiseExpressions
Thearithmetic andbitwise expressionscombineintegerand oatingpointvalueswiththe
arithmetic operations usually availablein programming languages andinteger values with
bitwiselogicaloperations(interpretingintegervaluesasbit-vectors).
IntExpr
-
+
-
-
-
-
PrimaryExpr
-
BoolExpr
-
?
-
IntExpr
-
:
-
IntExpr
-
IntExpr
-
BinIntOperator
-
IntExpr
-
Theoperatoristhebitwisecomplement. Thatmeanseverybitofanintegervaluewillbe
ipped.The?operatorisasimpleif-then-else:IftheBoolExprisevaluatedtotrue,theop-
eratorreturnstherstIntExpr,otherwiseitreturnsthesecondIntExpr.TheBinIntOperator
isoneoftheoperatorsinTable6.7.
^
&
|
BitwiseXOR,ANDandOR
<<
>>
>>>
Bitwiseshiftleft,bitwiseshiftrightand
bitwiseshiftrightprependingzerobits(unsignedmode)
+
-
Additionandsubtraction
*
/
%
Multiplication,integerdivision,andmodulo
Table6.7:Binaryintegeroperators,inascendingorderofprecedence
C# PDF Convert: How to Convert Jpeg, Png, Bmp, & Gif Raster Images
Jpeg, Png, Bmp, Gif Image to PDF. |. Home ›› XDoc.Converter ›› C# Converter: Raster Image to PDF.
best convert pdf to jpg; change pdf to jpg format
Online Convert Jpeg to PDF file. Best free online export Jpg image
Online JPEG to PDF Converter. Download Free Trial. Convert a JPG to PDF. You can drag and drop your JPG file in the box, and then start
.pdf to .jpg online; convert pdf file into jpg format
60
BasicTypesandAttributeEvaluationExpressions
Ifoneoperandislongtheoperationiscarriedoutwith64Bits,otherwisetheoperation
is carriedout with h 32Bits, i.e. . int-sized| | evenif allthe operands areoftype byte or
short.
FloatExpr
-
+
-
-
-
PrimaryExpr
-
BoolExpr
-
?
-
FloatExpr
-
:
-
FloatExpr
-
FloatExpr
-
BinFloatOperator
-
FloatExpr
-
The?operator isasimpleif-then-else: : Ifthe e BoolExpr is evaluatedtotrue,theoperator
returnstherstFloatExpr,otherwiseitreturnsthesecondFloatExpr.TheBinFloatOperator
isoneoftheoperatorsinTable6.8.
+
-
Additionandsubtraction
*
/
%
Multiplication,divisionandmodulo
Table6.8: Binary oatoperators,inascendingorderofprecedence
NOTE(27)
The%operatoron oatvaluesworksanalogoustotheintegermodulooperator.Forinstance
4.5 % 2.3 3 == 2.2.
Ifoneoperandisdoubletheoperationiscarriedoutwith64Bits,otherwisetheoperation
iscarriedoutwith32Bits,i.e. float-sized.
6.6 StringExpressions
Stringexpressionscombinestringvaluesbystringoperations,withintegernumbersusedas
helperstodenotepositionsinthestrings(andgivingtheresultoflengthcounting).
StringExpr
-
PrimaryExpr
-
MethodSelector
-
StringExpr
-
+
-
StringExpr
-
StringExpr
-
in
-
StringExpr
-
XDoc.Converter for .NET, Support Documents and Images Conversion
This .NET file converter SDK supports various commonly used document Office (2003 and 2007) Word, Excel, PowerPoint, PDF, Tiff, Dicom, SVG, Jpeg, Png, Bmp
changing pdf to jpg; convert pdf image to jpg image
VB.NET PDF Converter Library SDK to convert PDF to other file
As this VB.NET PDF converter component plug-in embeds several image image converting applications, like PDF to tiff conversion, PDF to JPEG conversion and
.pdf to jpg; convert pdf picture to jpg
6.6 StringExpressions
61
MethodSelector
-
.
-
MethodName
-
(
-
Variable
,
-
)
-
The operator + concatenates two strings. . The e operator in returns true if the left string
is containedinthe right string(false otherwise). . Thereareseveraloperations s onstrings
availableinmethodcallnotation(MethodSelector),theseare
.length()
returnslengthofstring,asint
.startsWith(strToSearchFor)
returnswhetherthestringbeginswithstrToSearchFor:string,asboolean
.endsWith(strToSearchFor)
returnswhetherthestringendswithstrToSearchFor:string,asboolean
.indexOf(strToSearchFor)
returns rst positionwherestrToSearchFor:string appearsat,asint,or -1ifnot
found
.indexOf(strToSearchFor, startIndex)
returnsrstpositionwherestrToSearchFor:stringappearsat(movingtotheend),
whenwestartthesearchforitatstringpositionstartIndex:int,asint,or-1ifnot
found
.lastIndexOf(strToSearchFor)
returnslastpositionstrToSearchFor:stringappearsat,asint,or-1ifnotfound
.lastIndexOf(strToSearchFor, startIndex)
returnslastpositionstrToSearchFor:stringappearsat(movingtothebegin),when
westartthesearchforitatstringpositionstartIndex:int,asint,or-1ifnotfound
.substring(startIndex, length)
returnssubstringofgivenlength:intfromstartIndex:inton
.substring(startIndex)
returnssubstringfromstartIndex:inton(offullremaininglength)
.replace(startIndex, length, , replaceStr)
returns stringwithsubstringfromstartIndex:intonofgivenlength:int replaced
byreplaceStr:int
.toLower()
returnsalowercaseversionofthestring
.toUpper()
returnsanuppercaseversionofthestring
.asArray(separator)
returnstheoriginalstringexplodedtoanarrayofsubstrings(array<string>),ateach
occurenceofthe separator:string;theseparators are notincludedinthearray. . If
separatorisempty,yougettheoriginalstringexplodedtoanarrayofsingle-character
strings(anarray<string>containsanasStringmethodforreversal).
C# PDF Converter Library SDK to convert PDF to other file formats
Help to convert PDF to multiple image formats, including GIF, BMP, JPEG, PNG and so on. Remarkably, this PDF document converter control for C#.NET can
convert pdf image to jpg online; convert .pdf to .jpg online
C# Create PDF from images Library to convert Jpeg, png images to
NET converter control for It enables you to build a PDF file with one or more images. Various image forms are supported which include Png, Jpeg, Bmp, and Gif
convert pdf pictures to jpg; convert pdf photo to jpg
62
BasicTypesandAttributeEvaluationExpressions
EXAMPLE(16)
Forn.str == "foo bar foo"theoperationsyield
n.str.length()==11
n.str.startsWith("foo")==true
n.str.endsWith("foo")==true
n.str.indexOf("foo")==0
n.str.indexOf("foo", 1)==8
n.str.lastIndexOf("foo")==8
n.str.substring(4,3)=="bar"
n.str.substring(4)=="bar foo"
n.str.replace(4,3,"foo")=="foo foo o foo"
n.str.toUpper()=="FOO BAR FOO"
n.str.asArray(" ")==array<string>["foo","bar","foo"]
6.7 TypeExpressions
TypeExpr
-
TypeIdent
-
typeof
-
(
-
NodeOrEdge
-
)
-
Atypeexpressionidentiesatype(and|intermsofmatching|alsoitssubtypes). Atype
expressioniseitheratypeidentieritselforthetypeofagraphelement. Thetypeexpression
typeof(x)standsforthetypeofthehostgraphelementxisactuallyboundto.
EXAMPLE(17)
T
T1
T2
T4
T3
Theexpressiontypeof(x)<=T2appliedtothetypehierarchyontheleft
side yields true if f x is s a graph h element t of type e T T or T1 or T2. . The
expressiontypeof(x)>T2onlyyieldstrueforxbeingagraphelement
oftypeT4. TheexpressionT1<T3alwaysyieldstrue.
6.8 PrimaryExpressions
After we’veseen n the all the ways s tocombine expressions, , nally y we’ll l have alook k at the
atomstheexpressionsarebuiltof.
6.8 PrimaryExpressions
63
PrimaryExpr
-
CastExpr
-
MemberAccess
-
FunctionCall
-
VarIdent
-
::
-
GlobalVarIdent
-
nameof
-
(
-
NodeOrEdge
-
)
-
uniqueof
-
(
-
NodeOrEdge
-
)
-
random
-
(
-
IntExpr
-
)
-
(
-
Expression
-
)
-
Thenameofqueryreturnsthename(persistentname,seeexample125or22.2.8)ofthe
givengraphelementasstring(graphselementsofpureLGSPGraphsbearnoname,thenthe
queryfails,butnormallyyouareusingLGSPNamedGraphs).Besidesnodesoredges,subgraphs
maybegiven,thenthenameofthesubgraphisreturned. Ifnoargumentisgiven,thename
ofthegraph(thecurrenthostgraph)isreturned.
Theuniqueofqueryreturnstheuniqueid(see22.2.9)ofthegivengraphelementasint
(youonlyreceiveauniqueidincaseuniquenesswasdeclaredinthemodel). Besidesnodes
or edges,subgraphs maybe given,thentheunique idofthe subgraphis returned. . Ifno
argumentisgiven,theuniqueifofthegraph(thecurrenthostgraph)isreturned.
The random function returns s a a double random value in between 0.0 0 and d 1.0 if called
withoutanargument,or,ifanintegerargumentvalueisgiven,anintegerrandomvaluein
between0andthevaluegiven,excludingthevalueitself.
CastExpr
-
(
-
PrimitiveType
-
)
-
PrimaryExpr
-
MemberAccess
-
NodeOrEdge
-
.
-
Ident
-
FunctionCall
-
FunctionName
-
(
-
Expr
,
-
)
-
The cast t expression returns s the e original l value e casted to o the e new prexed d type. . The
memberaccessn.areturnsthevalueoftheattributeaofthegraphelementn. Afunction
64
BasicTypesandAttributeEvaluationExpressions
callemploysanexternal(attributeevaluation)function(cf.25.2),ora(internal)user-dened
function (see 12.5.1), or r one of the e following g built-in n functions contained in the e built-in
packageMathorinthebuilt-inpackageTime(formoreonpackagessee16.2.2):
Math::min(.,.)
returns thesmaller ofthetwoargumentvalues,whichmust be ofthe samenumeric
type(i.e.botheitherbyteorshortorintorlongorfloatordouble)
Math::max(.,.)
returns thegreater of the two argument values, , whichmust t be ofthe samenumeric
type(i.e.botheitherbyteorshortorintorlongorfloatordouble)
Math::abs(.)
returnstheabsolutevalueoftheargument,whichmustbeofnumerictype(i.e. byte
orshortorintorlongorfloatordouble)
Math::ceil(.)
returnstheceilingoftheargument,whichmustbeoftypedouble
Math::floor(.)
returnsthe ooroftheargument,whichmustbeoftypedouble
Math::round(.)
returnstheargumentrounded,whichmustbeoftypedouble
Math::truncate(.)
returnstheargumenttruncated,whichmustbeoftypedouble
Math::pow(.,.)
returnstherstargumentvaluetothepowerofthesecondvalue;bothmustbeoftype
double
Math::pow(.)
returnsetothepoweroftheargumentvalue,whichmustbeoftypedouble
Math::log(.,.)
returnsthelogarithmoftherstargumentvalueregardingthebasegivenbythesecond
value;bothmustbeoftypedouble
Math::log(.,.)
returnsthelogarithmoftheargumentvaluethatmustbeoftypedoubleregardingthe
basee
Math::sgn(.)
returnsthesignumoftheargument,whichmustbeoftypedouble( 1ifnegative,1
ifpositive,0ifzero)
Math::sin(.)
returnsthesineoftheargument,whichmustbeoftypedouble
Math::cos(.)
returnsthecosineoftheargument,whichmustbeoftypedouble
Math::tan(.)
returnsthetangentoftheargument,whichmustbeoftypedouble
Math::arcsin(.)
returnstheinverseofthesinefortheargument,whichmustbeoftypedouble
6.8 PrimaryExpressions
65
Math::arccos(.)
returnstheinverseofthecosinefortheargument,whichmustbeoftypedouble
Math::arctan(.)
returnstheinverseofthetangentfortheargument,whichmustbeoftypedouble
Math::pi()
returnstheconstant,oftypedouble
Math::e()
returnstheconstante,oftypedouble
Math::byteMin()
returnsthesmallestnumbersupportedbytypebyte
Math::byteMax()
returnsthelargestnumbersupportedbytypebyte
Math::shortMin()
returnsthesmallestnumbersupportedbytypeshort
Math::shortMax()
returnsthelargestnumbersupportedbytypeshort
Math::intMin()
returnsthesmallestnumbersupportedbytypeint
Math::intMax()
returnsthelargestnumbersupportedbytypeint
Math::longMin()
returnsthesmallestnumbersupportedbytypelong
Math::longMax()
returnsthelargestnumbersupportedbytypelong
Math::floatMin()
returnsthesmallestnumbersupportedbytypefloat
Math::floatMax()
returnsthelargestnumbersupportedbytypefloat
Math::doubleMin()
returnsthesmallestnumbersupportedbytypedouble
Math::doubleMax()
returnsthelargestnumbersupportedbytypedouble
Time::now(.)
returnsthecurrentUTCtimeaslong,givenaswindowsletime(i.e.100nstickssince
1601-01-01)
Literal
-
Constant
-
ContainerConstructor
-
66
BasicTypesandAttributeEvaluationExpressions
Constant
-
EnumLit
-
Number
-
HexNumber
-
FloatingNumber
-
QuotedText
-
BoolLit
-
NullLit
-
TheConstantsare:
EnumLit
Isthevalueofanenumtype,giveninnotationEnumType ’::’ ’ EnumValue.
Number
Isabyteorshortorintorlongnumberindecimalnotationwithoutdecimalpoint,
postxedbyyorYforbyte,postxedbysorSforshort,postxedbylorLforlong,
orofinttypeifnotpostxed.
HexNumber
Isabyteorshortorintorlongnumber inhexadecimalnotationstartingwith0x,
thedierenttypesaredistinguishedbythesuxasforadecimalnotationnumber.
FloatingNumber
Isafloatordouble numberindecimalnotationwithdecimalpoint,postxedby f
orFforfloat,maybepostxedbydorDfordouble.
QuotedText
Isastringconstant. Itconsistsofasequenceofcharacters,enclosedbydoublequotes.
BoolLit
Isaconstantofbooleantype,i.e. oneoftheliteralstrueorfalse.
NullLit
Istheoneconstantofobjecttype,theliteralnull.
EXAMPLE(18)
Someexamplesofliterals:
1
Apple::ToffeeApple//anenum literal
2
42y//an integernumberindecimalnotationofbytetype
3
42s//an integernumberindecimalnotationofshort type
4
42 // anintegernumberin decimalnotationof int type
5
42L//an integernumberindecimalnotationoflongtype
6
0x7eadbeef//anintegernumberinhexadecimalnotationofinttype
7
0xdeadbeefL//anintegernumber inhexadecimalnotation oflongtype
8
3.14159//a doublenumber
9
3.14159f // afloatnumber
10
"ve rule and 0wn ze vorld" // atext literal
11
true//a boolliteral
12
null//theobjectliteral
Documents you may be interested
Documents you may be interested