SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Guest

    STRING to INTEGER (SILKTEST)

    How can we Cast String to Integer;

    i am retriving value from excel sheet, (M1=22000);

    Ex:
    [ ] hstmnt = DB_ExecuteSql (hdbc, "SELECT M1 FROM `Sheet1$` WHERE CALM='CONSTANT 78'")
    [-] while (DB_FetchNext (hstmnt, M1 ))
    [ ] INTEGER iCON=M1


    [ ] INTEGER iCON=M1-----Type Mismatch Error"


    Here M1 returns "STRING"..... But for my process i need to convert into INTEGER.




    ------------------

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: STRING to INTEGER (SILKTEST)

    Val is the function that converts a STRING into an INTEGER or a REAL.

    If you try typecasting (e.g.- i = [INTEGER]"foo") you'll get the ASCII value of the first character of the string. (In the example above, you'll get 102.)

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  3. #3
    Guest

    Re: STRING to INTEGER (SILKTEST)

    Thanks Mr.dcreed......


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:50 AM.

Copyright BetaSoft Inc.