前往Shuct.Net首页

Shudepb PB反编译专家长时间以来,为业内同类软件事实上的唯一选择.细节,彰显专业.态度,决定品质.

关于PowerBuilder的搜索

PowerBuilder: when argument to a function is in dot-notation and has value null, a null is NOT received - Stack Overflow current community chat blog Stack Overflow Meta Stack Overflow Careers 2.0 more stack exchange communities Stack Exchange sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site careers 2.0 Stack Overflow Questions Tags Tour Users Ask Question Take the 2-minute tour × Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required. PowerBuilder: when argument to a function is in dot-notation and has value null, a null is NOT received up vote 0 down vote favorite I am calling a user-defined function and passing an argument that is in dot notation. For example, of_testingnullarg( tab_2.tabpage_comp_info.dw_webcomp_info.object.dormant[i] ) The above function is purely to demonstrate this problem. It accepts a long parameter and uses isNull() and messagebox() to tell the user if the parameter is null or not. Here is its listing: // of_testingnullarg( al_arg1 ) // strictly an experiment if isNull(al_arg1) then messageBox("al_arg1", "is null inside of_testingNullArg") else messageBox("al_arg1", "is NOT null inside of_testingNullArg, it is "+string(al_arg1)) end if When the dormant[i] (referring to the first function call) control contains a number, there is no problem--the parameter inside of_testingnullarg will contain the same number, as expected. But when the dormant[i] control has read null from the database, I find that the parameter inside of_testingnullarg does NOT hold null. It holds a number such as 16. Null was passed in (according to isNull()), but the parameter inside of_testingnullarg holds a number. It is not a random number, it is consistent, but seems to be dependent on how many parameters the function accepts. This problem does NOT reveal itself when I run the program inside the PowerBuilder IDE. (I am running PowerBuilder 12.5) It shows up only when I build the program and run the executable. I have found that if I first do this, the problem goes away: long ll_dormant ll_dormant = tab_2.tabpage_comp_info.dw_webcomp_info.object.dormant[i] of_testingnullarg( ll_dormant ) To summarize, the problem shows up when 3 things are true: I am NOT running the program through the PowerBuilder IDE My argument is in dot-notation (not inside a variable) The value in the control is null I think this must have something to do with a pointer on the call stack. It must be off 2 bytes or something. Is it common knowledge to always put the value into a variable first? function null PowerBuilder dot-notation share|improve this question asked 9 hours ago SeedCertProgrammer 1 add comment active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Stack Exchange Post as a guest Name Email required, but not shown Post as a guest Name Email required, but not shown discard By posting your answer, you agree to the privacy policy and terms of service. Browse other questions tagged function null PowerBuilder dot-notation or ask your own question. asked today viewed 5 times Community Bulletin event Burn the close review queue – until crispy Related 18 Optional function parameters: Use default arguments (NULL) or overload the function? 2 'Null-Safe' Dot notation in VB.NET … or does it exist in any language? 'safe dereferencing operator' or equivalent using LINQ? 0 PowerBuilder NULL and Empty variable 1 PowerBuilder function Pos, Mid does not work after migration 0 Using PowerBuilder 12.5 to call web service method returns null response 0 PowerBuilder Find function throws an error “expression is not valid” 1 Best way for dot notation access to multidimensional array in PHP 1 PowerBuilder window controls null? 0 JavaScript Dot Notation with Objects in Objects 0 Dot notation in scheme Hot Network Questions What does "FILENAME=$(echo $INFILE | grep -oE "[^/]+$") " mean? Pokemon Yellow- Is money finite? Reverse a String in Java What should I do when my dream company is interested in me before my skills are developed? Is it possible to solve this equation by hand? Unpacking more than one list as argument for a function Why is "rollback it" incorrect? How much has changed since the start of One piece? Most creative way to display 42 Why fold in ingredients, why not just whisk? Crash (i.e. cause the interpreter to stop working and force close) Python Lazy/Busy Professor does not give me my confirmation Can we change the acceptance rate in random walk Metropolis algorithm by changing the parameter of the proposal distribution? align* not aligning properly with \sqrt What is the intent of attaching legs to the rocket? [S]he has the ears of a ...? Why couldn't Luca Parmitano just drink that water? Modelling a Call Center Determine if an integer is a palindrome in any radix (base) Edge labels at same distances from the center Are there any open vulnerabilities in this mailer script? Why should I use a logarithmic pot for audio applications? Why are you required to commit to a full stop landing if reverse thrust is selected? Should export of an editable table view to Spreadsheet reflect user edits? more hot questions question feed about help badges blog chat data legal privacy policy jobs advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Other Stack Overflow Server Fault Super User Web Applications Ask Ubuntu Webmasters Game Development TeX - LaTeX Programmers Unix & Linux Ask Different (Apple) WordPress Answers Geographic Information Systems Electrical Engineering Android Enthusiasts Information Security Database Administrators Drupal Answers SharePoint User Experience Mathematica more (14) Photography Science Fiction & Fantasy Personal Finance & Money Seasoned Advice (cooking) Home Improvement more (12) English Language & Usage Skeptics Mi Yodeya (Judaism) Travel Christianity Arqade (gaming) Bicycles Role-playing Games more (21) Mathematics Cross Validated (stats) Theoretical Computer Science Physics MathOverflow more (7) Stack Apps Meta Stack Overflow Area 51 Stack Overflow Careers site design / logo © 2014 stack exchange inc; user contributions licensed under cc by-sa 3.0 with attribution required rev 2014.2.28.1410 Stack Overflow works best with JavaScript enabled