To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 8967
    vb variable size —Mike McFarlane
   Allo Hopefully someone can help. I'm sending the following code to my RCX when I click on a vb menu item: Private Sub mnuFiveHundred_Click() SetDatalog 500 lego.SetVar 12, CON, 500 End Sub ie setting variable 12 to 500 in immediate mode. Variable 12 (...) (25 years ago, 12-Dec-99, to lugnet.robotics)
   
        Re: vb variable size —Dave Baum
   (...) The variables are 16 bit signed (-32768 to 32767), but the loop counter is only an 8 bit unsigned (0 to 255). When you set the loop counter from a variable it ignores the high bits and truncates. Dave Baum (25 years ago, 12-Dec-99, to lugnet.robotics)
   
        Re: vb variable size —Mike McFarlane
   Hi (...) Yep you're right Dave and I feel pretty stupid. The loop command is only good up to 255, so I'm now using a while...end while. I need to learn to read the RCX SDK parameter table a bit better. So much to learn, so much fun. Cheers ;-) Mike (25 years ago, 12-Dec-99, to lugnet.robotics)
   
        Re: vb variable size —Dave Baum
   Don't feel bad...I made the same mistake myself. Dave Baum (...) (25 years ago, 13-Dec-99, to lugnet.robotics)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR