command SWAP bug

In this category you can exchange your programming questions and solutions.
Post Reply
mrjay
Posts: 2
Joined: Tue Aug 09, 2011 9:11 am

command SWAP bug

Post: # 748Post mrjay
Tue Aug 09, 2011 9:16 am

I think so, there is a bug with SWAP. Look at:
[code]
`swap_test by PaPi
dim word1 as string,word2 as string
dim i1 as integer,i2 as integer
word1="first"
word2="second"
i1=1
i2=2
showmessage word1+chr$(9)+word2+chr$(9)+str$(i1)+chr$(9)+str$(i2)
swap word1 word2
swap i1 i2
showmessage word1+chr$(9)+word2+chr$(9)+str$(i1)+chr$(9)+str$(i2)
[/code]

Why????




______________________________________________

[img] http://www.hlgaming.com/images/interviews/yahn1.jpg [/img]
[url=http://www.egamebiz.com/wii-guitar-hero-wireless-controller-for-nintendo-wii.html] Wii Guitar Hero [/url]thise is my love[url=http://www.egamebiz.com/xbox-360-chatpad-xbox-360-text-messaging-kit.html]Xbox 360  keyboard[/url]this is my life[url=http://www.egamebiz.com/wii-zapper-light-gun.html] Wii Zapper Light Gun [/url]can you feeling?

mrjay
Posts: 2
Joined: Tue Aug 09, 2011 9:11 am

command SWAP bug

Post: # 749Post mrjay
Tue Aug 09, 2011 9:17 am

thanks````if U know , please tell me. :`(

vdobiasch
Posts: 3
Joined: Fri Nov 02, 2007 2:28 pm

command SWAP bug

Post: # 750Post vdobiasch
Tue Aug 09, 2011 9:59 am

`swap_test by PaPi
dim word1 as string,word2 as string
dim i1 as integer,i2 as integer
word1="first"
word2="second"
i1=1
i2=2
showmessage word1+chr$(9)+word2+chr$(9)+str$(i1)+chr$(9)+str$(i2)
swap word1, word2
swap i1, i2
showmessage word1+chr$(9)+word2+chr$(9)+str$(i1)+chr$(9)+str$(i2)

`This works for me fine

Post Reply