Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Copy-a-string/FreeBASIC/copy-a-string.basic
Normal file
12
Task/Copy-a-string/FreeBASIC/copy-a-string.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
Dim s As String = "This is a string"
|
||||
Dim t As String = s
|
||||
' a separate copy of the string contents has been made as can be seen from the addresses
|
||||
Print s, StrPtr(s)
|
||||
Print t, StrPtr(t)
|
||||
' to refer to the same string a pointer needs to be used
|
||||
Dim u As String Ptr = @s
|
||||
Print
|
||||
Print *u, StrPtr(*u)
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue