Funny Messsage

itspeteritspeter Member Posts: 105
Hi,

There is no issue here, encounter something funny and would like to share.

Declare variable:-
Name          DataType      Subtype
lauto_Shell  Automation  'Microsoft Shell Controls And Automation'.Shell
CREATE(lauto_Shell);
MESSAGE(FORMAT(lauto_Shell.Open(doscommandvar)));
CLEAR(lauto_Shell);
When run it, to prompt as below:-
---------------------------
Microsoft Business Solutions-Navision
---------------------------
Type conversion is not possible because 1 of the operators contains an invalid type.

JOKER := VOID

---------------------------
OK   
---------------------------
Regards,
Peter Ng

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I got the same error last week.

    If I remember correctly it poped up after I changed the returnvalue of a function, but I'm not sure. :?
  • wakestarwakestar Member Posts: 207
    hi

    the method 'open' doesn't have any return value ---> so you cannot use it with FORMAT(...)
  • itspeteritspeter Member Posts: 105
    Hi wakestar,

    I know, I was just playing with it. :wink:
    Wanted to see how FORMAT handle void function.
    Regards,
    Peter Ng
  • wakestarwakestar Member Posts: 207
    aaah, I see :D

    obviously FORMAT uses the 'Joker' for such cases :wink:
  • Michael_SchumacherMichael_Schumacher Member Posts: 81
    wakestar wrote:
    aaah, I see :D

    obviously FORMAT uses the 'Joker' for such cases :wink:

    Now there is only one question left:

    Was it the "50:50", the "call a friend" or the "audience query" joker? :lol:
    regards,
    Michael Schumacher

    oh, what day is it? Backup day. OK, let's dump all data to /dev/nul ;-)
  • PrebenRasmussenPrebenRasmussen Member Posts: 137
    There's a thread like this one here:

    http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=6559
  • nelsonnelson Member Posts: 107
    While we're at it, about about this error message? This was in Financials a few years ago.
    I do have a screenshot but I haven't kept the code which triggered the error.
    The function  was called with Text in the parameter 1.
    
    It should have been Text.
    
    Nelson Alberto
Sign In or Register to comment.