前往Shuct.Net首页

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

关于PowerBuilder的搜索

PowerBuilder: when argument to a function is in dot-notation and has value null, a null is NOT received New Questions Recently Answered Archives Contact PowerBuilder: when argument to a function is in dot-notation and has value null, a null is NOT received Content on this page is from Stackoverflow Date Published: 02/28/2014 5:49 PM Author: user3365811 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? View full answer on Stackoverflow View Local Answers... Can't find the answer to this question? No answers yet. Can you answer this question? PowerBuilder: when argument to a function is in dot-notation and has value null, a null is NOT received Your Nickname Your Answer Enter the code below to prove you are human Can you answer these? Answer to get the information Answer I want to insert arabic directly in MySQL database but it gives error, how to solve it? Answer Generating an image from a raw vector containing a PNG image with Python. Answer Cannot save Shared preferences, it crashes because the context is null, fragment already replaced Answer Element from JSON Answer How to add and remove style component on the fly by javascript? Answer Creating a list of the different numbers that occur in a 2D array using the GPU Answer Multiple Roll Over Images Answer Why is there no StrongReference object? Answer Drawbacks of using jQuery to cycle through images on a website New Questions Recently Answered Archives Contact © Copyright 2014 qnundrum.com | Privacy Policy