--- a/ExternalLong.st Tue Nov 03 18:55:31 2009 +0100
+++ b/ExternalLong.st Wed Nov 04 17:10:18 2009 +0100
@@ -32,6 +32,12 @@
other person. No title to or ownership of the software is
hereby transferred.
"
+!
+
+documentation
+"
+ mostly added for odbc
+"
! !
!ExternalLong class methodsFor:'instance creation'!
@@ -55,7 +61,6 @@
!ExternalLong methodsFor:'accessing'!
asBoolean
-
|result|
result := self byteAt:1.
@@ -63,9 +68,6 @@
^ false.
].
^ true.
-
- "
- "
!
asInteger
@@ -77,26 +79,23 @@
!
asNullStatus
-
|result|
result := self wordAt:1 MSB:false.
- result = 0 ifTrue:[
- ^ #SQL_NO_NULLS.
- ] ifFalse:[
- result = 1 ifTrue:[
- ^ #SQL_NULLABLE.
- ] ifFalse:[
- ^ #SQL_NULLABLE_UNKNOWN
- ].
- ].
- ^ nil
+ result = 0 ifTrue:[ ^ #SQL_NO_NULLS ].
+ result = 1 ifTrue:[ ^ #SQL_NULLABLE ].
+ ^ #SQL_NULLABLE_UNKNOWN
+!
+
+asPointer
+ ^ ExternalBytes address:(self value)
+
+ "
+ (ExternalLong new value:10) asPointer
+ "
!
boolean:bool
-
- |result|
-
bool ifTrue:[self byteAt:1 put:1].
self byteAt:1 put:0.
!
@@ -118,5 +117,9 @@
!ExternalLong class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/ExternalLong.st,v 1.4 2008-01-22 22:31:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/ExternalLong.st,v 1.5 2009-11-04 16:10:18 cg Exp $'
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libbasic2/ExternalLong.st,v 1.5 2009-11-04 16:10:18 cg Exp $'
! !