Ewon TechForum
Providing technical solutions to technical requests


String type in basic
khaterchi Offline
Junior Member
#1
Hello,

I have two issues :

  1. How can I cast a String into integer in basic like
    index$=“2”
    i%=index$

  2. I want to get the variable name dynamically by iteration
    FOR a% = 1 TO 5
    colN$=(columnName+STR$(a%))!
    OPEN “test.csv” FOR BINARY APPEND AS 1
    PUT 1,colN$ +CHR$(13)+CHR$(10)
    CLOSE 1
    NEXT a%
    PS: the columnName is the adress of an input text(HTML)
Thanks in advance
Reply

tedsch Offline
Junior Member
#2
These issues are addressed in the following post.

https://forum.hms-networks.com/t/basic-s...pe/58979/7
Reply

khaterchi Offline
Junior Member
#3
Hello,

 
For the second issue I need it to create a report (csv file), in each line contains Column 1, Column 2,... Column 10 submitted  from a html page, as it's montioned in the image capture1 below, and that columns are created dynamically by the button "add column", and each html element(input text, checkbox,...) for every line has a different adress. To create the report I use the special forms by sending basic commands line that supports only 255 character, then to declare (**) all these inputs in basic command line will exceed the limit number of characters. 
Can I create a basic variable name dynamically ? or Is there any other solution? 

(**) <input type="hidden" name="Command1" value='
columnName1$= columnName1!
variable1$= variable1! 
fct1$= function1!
dec1$= dec2!

columnName2$= columnName2!
variable2$= variable2! 
fct2$= function2!
dec2$= dec2!


//.... etc until 

columnName10$= columnName10!
variable10$= variable10! 

fct10$= function10!
dec10$= dec10!


//...
'>

 
All thoughts will be appreciated.


Attached Files
.png   Capture1.PNG (Size: 14,94 KB / Downloads: 1)
Reply



Possibly Related Threads…
02-07-2020, 08:49 PM
Last Post: NTA_JK
26-06-2020, 11:50 AM
Last Post: simon
  Console Basic script Started by Cst
1 Replies - 83 Views
24-06-2020, 09:45 AM
Last Post: simon
19-06-2020, 02:39 PM
Last Post: simon
16-06-2020, 03:03 PM
Last Post: simon
16-06-2020, 02:58 PM
Last Post: simon
  Redirect via BASIC Script Started by bdoucet
1 Replies - 129 Views
04-06-2020, 02:12 PM
Last Post: simon
02-06-2020, 01:58 PM
Last Post: simon
  Int to String Started by jonteohr
7 Replies - 3.067 Views
28-05-2020, 03:30 PM
Last Post: simon
  Email (string issue) Started by Mike3001
3 Replies - 213 Views
19-05-2020, 12:08 PM
Last Post: Jean-Yves



Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy