PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Parameter Questions  (Read 2040 times)

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Parameter Questions
« on: October 30, 2018, 08:45:40 PM »
Had some questions on these system parameters and was wondering if
anyone has experience to share.

'AC'         Auto convert numbers & Strings
Appears to be a command line input only parameter.  Both Editors choke in 2018. 
Since it is new in 2017 I assume there is a reason for it, perhaps SQL? 

'AD'         Auto-DIM's an array.
Does the Auto Dim just work on {all} assignments? 
Tried  for loop and got the expected error assigning an array element to an undeclared array element. 

'BT'         Binary Test: 1st Read
Not sure how this is different.  Thought isz always meant binary.

This one looks useful.  But I still get an error 43 on a 17 digit number and 15 digit plus 4 commas mask.  Does it need to be combined with something? 
'F,'         Suppress Commas on Numeric Overflow

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Parameter Questions
« Reply #1 on: October 31, 2018, 08:17:54 AM »
The 'AC' parameter is for general ease of use. With it on you can type numstr$=10 and the system will convert it to numstr$=str(10) for you. It works with both editors from my testing. In ED+ you don't see the conversion until you save it and reload it. In IT you see the conversion right away.

What do you mean when you say it causes both editors to choke?
Principal Software Engineer for PVX Plus Technologies LTD.

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Parameter Questions
« Reply #2 on: October 31, 2018, 08:33:09 AM »
Regarding the 'F,' parameter, it only impacts PRINT statements with format specifications, not the STR function.  Is that possibly what you are seeing?

->print 123456789.01:"##,###,##0.00"
Error #43: Format mask invalid
->x$=str(123456789.01:"##,###,##0.00")
Error #43: Format mask invalid
->set_param 'f,'
->print 123456789.01:"##,###,##0.00"
 123456789.01
->x$=str(123456789.01:"##,###,##0.00")
Error #43: Format mask invalid


The STR function has both an error branch and ability to provide an alternate output which is why the parameter is not used.  It could cause application logic problems.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Re: Parameter Questions
« Reply #3 on: November 01, 2018, 07:00:27 PM »
Mike,

Yes I did test with the str() function when it gave the error. 

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Re: Parameter Questions
« Reply #4 on: November 01, 2018, 07:19:15 PM »
Devon,

Retried today and it works as expected. 

I had just set my 2018 license and had not rebooted when I got the error.  Yesterday I was getting red text and a syntax error doing x=x$ and vice versa on line one and two with line numbering off, (my normal), and could save the program with warnings.  Since it was all syntax errors on save,  it was blank on re-opening.  I think the 2018 was a Direxions version so perhaps it updated, or a reboot corrected the issue.   

Otherwise very convenient indeed as this is one of the few typos I am prone to make in UltraEdit text coding and should fix itself on pasting.