How Do I Concatenate Strings in Visual Basic? Primary Software: Measurement Studio>>Visual Basic SupportPrimary Software Version: 7.0 Primary Software Fixed Version: N/A Secondary Software: Driver Software>>NI-488.2 Hardware: GPIB
Problem: I am writing a GPIB application in Visual Basic and I would like to be able to build message strings on the fly. How do I concatenate strings in Visual Basic? Solution: If you have several strings or variables mixed with the strings, and you want to combine them, you can use concatenation (the ampersand character, &). Here is an example: String1 = "Sample1"The concatenation of the strings would be: "Sample1" & FREQ & "Sample2". In a simple ibwrt command you would write this as: CALL ibwrt (ud%, "Sample 1" & FREQ & "Sample"$); Related Links: Developer Zone Tutorial: GPIB Language Interfaces Product Manuals: Using Your NI-488 and NI-488.2 Subroutines for Visual Basic for Windows Attachments:
Report Date: 02/13/1998 Last Updated: 02/01/2008 Document ID: 16CA674S |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
