English
Forum

MakeLong, whence the Difference?

 
Hello Roland - Why react both MakeLongs different? Typenkonvertierung? the has in a large Code me for very plenty Furore led
CompileMarkSeparation
def MakeLong2(2) OR(@&(1),MUL(@&(2),$10000))
print Makelong(5,0)
print makelong2(5,0)
declare m#
dim m#,2
byte m#,0=65
byte m#,1=chr$(0)
print string$(m#,0)
print "Ab hier:"
print makelong2(m#,0)
print makelong(m#,0)
y
 
10/10/06  
 




Jörg
Sellmeyer
in a, but interestingly is too, that these (really same) Definition the value without Dezimalpunkt and nobodies outputs:
CompileMarkSeparation
Def MakeLong3(2) @&(1) | (@&(2) * $10000)
>
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/10/06  
 



Well because XProfan hold everything Floatet...
 
10/10/06  
 




RGH
Hello iF,

the two Parameter the function MakeLong must naturally of type Word (2 byte) his. but m# on my own yields Yes The address of m# and these is naturally one LongInt (4 byte). your function screen not, and comes therefore to a others Result. The XProfan-function berücksichtigt but only each one Word, means entrapments the two höherwertigen byte the address under whom table. (from Geschwindigkeitsgründen verzichte I on a Error Message.)

If you though the Word in m# using wanted, müßtest You write:
CompileMarkSeparation
!print makelong2(word(m#,0),0)
print makelong(word(m#,0),0)e>

... and then are itself both functions again einig!

naturally can You too your DEF adjust, sodaß it only Words accepted, or. whom Word-share one To large Parameters:
CompileMarkSeparation
!def MakeLong2(2) INT(OR(AND(@&(1),$FFFF),MUL(AND(@&(2),$FFFF),$10000)))
>

then functions it exakt as XProfan-function.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/10/06  
 



everything clear! its noticed because one Sendmessage Parameter 4 with the XProfan10own MakeLong failed , what before however free from problems went. are You you sure the the XProfan10Own Makelong then so functions How of manchen Apis expects? If an example necessary his ought to wühle I...
 
10/10/06  
 




RGH
How differently ought to one MakeLong functions? In Delphi z.B. functions MakeLong exakt just as: two Word-Parameter go to a LongInt or. LongWord zusammengefügt! (In derTat use I naturally The MakeLong-function of Delphi for the MakeLong in XProfan.)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
10/10/06  
 



Hm you have naturally right.
 
10/11/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.036 Views

Untitledvor 0 min.
H.Brill08/04/23
Sven Bader08/03/21
Detlef Jagolski02/21/12

Themeninformationen

this Topic has 3 subscriber:

iF (4x)
RGH (2x)
Jörg Sellmeyer (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie