Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

If Substring(Textbox.Text,0,1) < "J" Then ' ERROR!!!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2009, 07:38 PM
Newbie
 
Join Date: Jan 2009
Posts: 4
Default If Substring(Textbox.Text,0,1) < "J" Then ' ERROR!!!

An error ocurred on sub main.button1.click

Line number 12

If SubString(Textbox1.Text, 0,1) < "J" Then
Error description:
La cadana de entrada no tiene el formato correcto.
Continue?




PD: Only with equal (=) work fine

¿And if i am making a mistake, what is the way to do that comparison?
Reply With Quote
  #2 (permalink)  
Old 02-12-2009, 08:08 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

How do you what to evaluate a letter?
This is not a bug iut only a misscode..
To evealuate a letter you shouls only compare if it is equal to, or not..(=,<>)

Code:
If SubString(Textbox1.Text, 0,1) < "J" Then
here you are trying to find if the reulting letters is LESS(?) than "J"..
This cannot be evaluetes this way..

to evaluate this issue, you should first convert your SubString(Textbox1.Text, 0,1) to the ascii table value...and THEN, compare with the ASCII value of the letter"J"...

See the ASC keyword on the main help....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #3 (permalink)  
Old 02-12-2009, 08:12 PM
Newbie
 
Join Date: Jan 2009
Posts: 4
Default

Thank you very much for your respond to my post dear friend, and i will try to compare in that way.

Obrigado.
Reply With Quote
  #4 (permalink)  
Old 02-13-2009, 09:14 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,712
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can also use StrCompare to compare strings by their lexicographic order.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auslesen einer Tabelle in eine Textbox und löschen von "0,00-Ergebnissen" JOTHA German Forum 8 11-29-2008 08:50 AM
Text an einen bereits bestehenden Text "anhängen" JOTHA German Forum 7 09-12-2008 01:08 PM
"Online" monitored TextBox Standa Questions (Windows Mobile) 3 06-01-2008 10:27 PM
calling the device's "Programs" or "settings" screens HarleyM Questions (Windows Mobile) 0 12-05-2007 02:59 AM
Error message: "Not correct version of dll" BjornF Questions (Windows Mobile) 5 09-17-2007 03:16 PM


All times are GMT. The time now is 03:34 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0