Hello,
can anyone tell me FNX`s equivalent of VB`s StrPtr(var) ?
Thank you
Gerhard
StrPtr() in FNX
StrPtr() in FNX
Those this will do?
VARPTR function
Returns the memory address.
Syntax: Varptr(variable name)
Returns the memory address used by windows for a specific variable.
Dim a as integer
Print Varptr(a)
The diference is that StrPtr(val) returns the adress of the first char in the string right?
VARPTR function
Returns the memory address.
Syntax: Varptr(variable name)
Returns the memory address used by windows for a specific variable.
Dim a as integer
Print Varptr(a)
The diference is that StrPtr(val) returns the adress of the first char in the string right?
-
- Posts: 10
- Joined: Tue Sep 17, 2013 10:55 am
StrPtr() in FNX
Yes. This seems to be correct.
So I think this could not be directly done ind FNX.
varptr requires a numeric variable, strptr a string.
Any suggestions how it can be done?
So I think this could not be directly done ind FNX.
varptr requires a numeric variable, strptr a string.
Any suggestions how it can be done?
StrPtr() in FNX
Well in Fnx you also could do like this:
[code]dim a as String
dim b as integer
a="Hello varptr"
b=10
print("My Adress is "+str$(varptr(a)))
print("Written Words -> "+a)
print("My Adress is "+str$(varptr(b)))
print("Integer -> "+str$(b))
sleep(5000)[/code]
Works for both int and string
[code]dim a as String
dim b as integer
a="Hello varptr"
b=10
print("My Adress is "+str$(varptr(a)))
print("Written Words -> "+a)
print("My Adress is "+str$(varptr(b)))
print("Integer -> "+str$(b))
sleep(5000)[/code]
Works for both int and string
-
- Posts: 10
- Joined: Tue Sep 17, 2013 10:55 am
StrPtr() in FNX
Thank you cvirus.
I`ll do it that way.
Gerhard
I`ll do it that way.
Gerhard
StrPtr() in FNX
Ok,
complete vars in varptr;
[code]
dim a as String
dim b as integer
dim c as double
dim d as boolean
a="Hello varptr"
b=10
c=5.2
d = 1
print("My Adress is "+str$(varptr(a)))
print("String -> "+a)
print()
print("My Adress is "+str$(varptr(b)))
print("Integer -> "+str$(b))
print()
print("My Adress is "+str$(varptr(c)))
print("Double -> "+str$(c))
print()
print("My Adress is "+str$(varptr(d)))
print("Boolean -> "+str$(d))
sleep(5000)
[/code]
complete vars in varptr;
[code]
dim a as String
dim b as integer
dim c as double
dim d as boolean
a="Hello varptr"
b=10
c=5.2
d = 1
print("My Adress is "+str$(varptr(a)))
print("String -> "+a)
print()
print("My Adress is "+str$(varptr(b)))
print("Integer -> "+str$(b))
print()
print("My Adress is "+str$(varptr(c)))
print("Double -> "+str$(c))
print()
print("My Adress is "+str$(varptr(d)))
print("Boolean -> "+str$(d))
sleep(5000)
[/code]