home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,955 of 10,840   
   Bert Byfield to All   
   Re: Right$ doesn't work   
   06 Nov 04 18:06:12   
   
   From: BertByfield@nospam.not   
      
   >>A project in VB6 recently worked without any problems but now it's   
   >>complaining when I try to use 'Right$'. In immediate mode, when I'm   
   >>typing 'print left$("123456",2)' I get the correct result '12'. When I   
   >>type 'print right$("123456",2) I expect the result '56' but all I get   
   >>is an error 'type declaration does not match declared data type'. And   
   >>I can't find that I have tried to declare 'right'. Can anyone explain   
   >>what can cause this problem?   
      
   The "$" declares "right" to be a string. Immediate mode is funny about how   
   you declare variables with a suffix. It keeps its own table of variables   
   and won't let you change it. Try "right" without the "$", which makes it a   
   variant and might undeclare it. The "2" might be a conflict, too.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca