Hi !
I wanted to display the values use smart string literal.
Simple variable display is possible
Now I wanted to pick the values either from list or string
Basically I wanted to use it in creating HTML.
regards
jng
I wanted to display the values use smart string literal.
Simple variable display is possible
B4X:
Dim item_quantity As Int
Dim item_price As Double
Dim subtotal As Double
Dim total As String
item_quantity = 5
item_price = 3.5
subtotal = item_quantity*item_price
total = $"${item_quantity} x $1.2{item_price} = $1.2{subtotal}"$
Log(total)
Now I wanted to pick the values either from list or string
B4X:
Dim item_quantity() As Int
Dim item_price() As Double
item_quantity = Array As Int(2,3,6,8)
item_price = Array As Double(3.5,5.1,2.2,1.5)
Dim total(item_price.length) As String
Dim subtotal(item_price.length) As Double
For i = 0 To item_quantity.length - 1
subtotal(i) = item_quantity(i)*item_price(i)
total(i) = $"${item_quantity(i)} x $1.2{item_price(i)} = $1.2{subtotal(i)}"$ ------Here I can I Do it
Next
Basically I wanted to use it in creating HTML.
regards
jng