Results 1 to 2 of 2

Thread: Numbrr to increasing string

Threaded View

Lionheart008 Number to increasing string 24-02-2024, 19:28
ErosOlmi First of all, thanks for... 26-02-2024, 21:19
Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    52
    Posts
    944
    Rep Power
    111

    Number to increasing string

    Hello ...

    I have Made a little example with increasing number and autoconverts to a String but found perhaps a Bug?

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    '---Script created on 02-24-2024 17:49:57 by lionheart
    '
    '
    uses "ui"
    long flag = 10
    flag++
    msgbox str$(flag) '11
    'thinbasic result 10 ?
    '
    ' number to an increasing string
    '
    '1)
    string s = "200"
    s = val(s)+1 '201
    msgbox  s 'result: "201"
    'thinbasic result: 2001
     
    '2)
    long k
    k++
    s = val(s)+k
    msgbox s 'result: "202"
    'thinbasic result : 2001
     
    '3)
    string m = " Mona"
    string st = "3000 " + m
    st = val(st)+1
    msgbox st + m 'result: 3001 Mona
    'thinbasic result: 30001
     
    '4)
    long km = 100
    km++
    string m =" Mona"
    string sr ="3000 " + m
    sr = val(sr) + val(km)+1
    msgbox sr + m 'result: 3102 Mona
    'thinbasic result: 30001001
    Last edited by Lionheart008; 24-02-2024 at 20:26.
    you can't always get what you want, but if you try sometimes you might find, you get what you need

Similar Threads

  1. Returning string from DLL in V1.10.7.0
    By GrahamC in forum Console
    Replies: 7
    Last Post: 20-01-2023, 19:12
  2. Never use Len when you use unicode string.
    By kcvinu in forum thinBasic General
    Replies: 3
    Last Post: 02-05-2021, 13:36
  3. String-in-String-Pointers?
    By ReneMiner in forum thinBasic General
    Replies: 9
    Last Post: 11-06-2013, 14:55

Members who have read this thread: 1

Posting Permissions

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