¤½¦¡¤£·|¡u¨Ì»Ýn¡v¨ÓÅçºâ©Î©I¥s¡F¤]´N¬O»¡¡A¬YÓ¤½¦¡¤£¯à©I¥s¨ä¥L¤½¦¡¨Ó°õ¦æ¤@¨Ç³B²z¡A§Y¨Ï¥Îªº¬O¥þ°ìÅܼơC
¨Ò¦p¡G
Rem Formula PrintSquare Global x As Number x = 5 formula = "The square of " & CStr(x,0) & " is " & ToText ({@square}, 0) & "." Rem Formula Square Global x As Number formula = x * x
¦b³øªí¨Ï¥Î¤½¦¡ PrintSquare ®É¡A±z·|±o¨ì¡G
The square of 5 is 0¡C
¦b¤W±ªº½d¨Ò¤¤¡A¤½¦¡ PrintSquare ¨Ï¥Îªº¬O¤½¦¡ Square¡A©Ò¥H Crystal Reports ·|±Æ§Ç¨äÅçºâ¡C³o®É·|¥ýÅçºâ²Ä¤@Ó Square¡AµM«á¤~Åçºâ PrintSquare¡C¦bÅçºâ Square ®É¡A¥þ°ìÅÜ¼Æ x ªºÈ¬° 0¡A¦]¬°³o¬O¥¼ªì©l¤Æ Number ÅܼƪºÈ¡C
¬Û¤Ï¦a¡A¦Ûq¨ç¦¡«h·|¨Ì»Ýn¨Ó¶i¦æÅçºâ©Î©I¥s¡C¥H¤U¬°¦b«e¤@Ó½d¨Ò¤¤¨Ï¥Î¦Ûq¨ç¦¡¡G
Rem Formula PrintSquare formula = "The square of " & CStr (5,0) & " is " & CStr(cf9Square (5),0) + "." Rem Custom Function cf9Square Function cf9Square (x As Number) cf9Square = x * x End Function
²{¦b¡A¦pªG±z¦b³øªí¤¤¨Ï¥Î¤½¦¡ PrintSquare¡A«h·|±o¨ì¡G
The square of 5 is 25.
«Ø¥ß¦Ûq¨ç¦¡ | ¦Ûq¨ç¦¡ ªº Basic »yªk | ¦Ûq¨ç¦¡ ªº Crystal »yªk