String in QBASIC is used to store string values. In previous chapter we have learnt to store and work with numeric values. In this lesson we will learn to manipulate string / alphanumeric values.
As we know that for storing string value in memory, we need to declare the variable as string. For declaring variable as string we use $ sign infront of variable name.
Example n$="Raja"
Here, we have declared the variable with name n and for declaring it as string we put $ sign with it.
Always remember that string value always enclosed in double quote. As we seen in the example, we have provided the value Raja.
As we know that for storing string value in memory, we need to declare the variable as string. For declaring variable as string we use $ sign infront of variable name.
Example n$="Raja"
Here, we have declared the variable with name n and for declaring it as string we put $ sign with it.
Always remember that string value always enclosed in double quote. As we seen in the example, we have provided the value Raja.
No comments:
Post a Comment
Thank you so much to like us.