>
> In the code, shouldn't I replace the "$" with its ascii decimal
equivalent(i.e. 36)? Or is enclosing the character in double
quotation marks fine?
Short answer: yes
Longer answer: try it
Dim ch As New Byte
Sub main()
If ch = "$" Then
End If
End Sub
Does the compiler accept the code? Yes, it does
Then look at the compiler output in the IDE by View -> Compiler
Output and browse down to where the program code actually does
something:
L2.Proc.Begin ;This.main
L3.If.Begin ;If ch = "$" Then
C0047:111 ;This.ch.Address
C0048:247 ;Read Var Byte
C0049:036 ;"$"
C0050:152 ;Is Equal.
C0051:137 ;16-Bit Value.
C0052:000 ;L3.If.End.HighByte
C0053:027 ;L3.If.End.LowByte
C0054:130 ;Branch On False.
L3.If.End
C0055:129 ;Branch.
L2.Proc.End
Notice the part where "$" is put in code as 036?
I would have pointed you to the place in the documentation that
answered your question but I couldn't find a sample of a simple
character literal used in an assignent.
Richard
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment