Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Apr 7, 1999

Export Data to Excel Example Array Arguments

Question:
"Export Data to Excel Through OLE Automation: A 10-Minute Solution" says:

"Refer to the section of the description: ... Create a function called GetColumns, which accepts two arguments, a datawindow and an unbound string array by reference, then add the following code:"

My question is: How can you pass an unbound string to a function? It is not supported in the argument type list. I am using PB 6.0.

Answer:
If you look carefully at the dropdown list of argument types, you will see it is an editable dropdown. PB only lists the most common types. You can type anything you like in there.

For passing an unbound array, you just need to put [] after the argument name exactly as you would in declaring a local variable.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date