Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Structures, Urgent!!!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I know the size of a structure???
exists someone function? Other languages it's so easy to do, but in Power Builder I didn't find any function to do it.

Thanks.
 
Dear Vinicius -

Unfortunately it's PowerBuilder, not C and you cannot use sizeof(...). There is no function to determine the lenght of the structure. I guess if you really need to know the size of it in chars, you'll need to create a variable of type String, convert every element into this and that use len()...

something like this:
assume that you structure str_emp_data str_emp has two fields - String name and long age,
than do something like this -
String ls_buffer
ls_buffer = str_emp.name
ls_buffer = ls_buffer + String(str_emp.age)
than your lenght will be len(ls_buffer)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top