Topic: Syntax error in Section [Download_Files]  (Read 83 times)

0 Members and 1 Guest are viewing this topic.

Syntax error in Section [Download_Files]
« on: April 21, 2017, 09:19:54 AM »

ied206

  • Chef
  • ***
  • Location: South Korea
  • Date Registered: Dec 2013
  • Posts: 114
There is syntax error in Section [Download_Files].

Code: [Select]
// This section also used directly by ML
// 1 Folder 2 FileName 3 Web (Cancelled 4 NoExit )
If,#3-,Equal,-,Echo,"Download File - Parameter Missing%,Warn
Else,Run,%Api%,Download_Files_P,#1,#2,#3,#4,#5,#6,#7,#8,#9

One of the doublequote is missing in Echo,"Download File - Parameter Missing%,Warn.
I found this error while testing Macro Library with PEBakery, WinBuilder seems to ignore this.


Re: Syntax error in Section [Download_Files]
« Reply #1 on: April 21, 2017, 11:43:01 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
Thanks ied206,

Macro Library updated to v43r76 with your fix.  :thumbsup:


ps:

keep in mind, there is rare double if inside plugins
If,....,If,.....
There is NO 3 or more if inside plugins
If,....,If,.....,If,.....
edit:
In history due to winbuilder bug reasons,  we intentionally avoid 3 or more If - Later in time we clean most of double if.

For your builder, We can convert all "double If" to "single If" ?  :great:
just let us know.    :thumbsup:

:turtle:
« Last Edit: Today at 12:04:37 AM by Lancelot »

Re: Syntax error in Section [Download_Files]
« Reply #2 on: Today at 12:39:13 AM »

ied206

  • Chef
  • ***
  • Location: South Korea
  • Date Registered: Dec 2013
  • Posts: 114
I hadn't tried to write kind of 'converting' operations.

But since PEBakery generates kind of parse tree internally, I think cleaning nested If/Else would be able later.

Edit:
I guess I misunderstood your question.

PEBakery currently supports nested If/Else, so there is no need to convert into single If.

However, if we can, converting nested If into single If will helps us in point of readability.
(It will also help converting WB syntax into new syntax)
« Last Edit: Today at 01:53:36 AM by ied206 »

 

Powered by EzPortal