Examples broken in v3.5

(Official Documentation Updates)

Examples broken in v3.5

Unread postby Goldsmith » Sun Sep 04, 2016 12:25 pm

Hi Mike,
I have tried 3 examples in FBSL LANG -- API/DLL Func -- #DllDeclare section in help file.

Ex1
Syntax check error = No Error
Run result = Error: &H2D : Object 'MB_YESNO' isn't found

Ex2 Result
Syntax check error = No Error
Run resut
(without deleting this line = "$DllDeclare Zlib("compress", "uncompress")
Error &H3F : Unable to load library 'zlib'

(With deleted the line= "$DllDeclare Zlib("compress", "uncompress")
Error: &H61: too many parameters

Ex3 result
Syntax check error = Error line12, 15. Unmatched double qoutes.
Run results = Run OK when without deleting $DllDeclare. But returned an error when i comment out that line. Result is = Error: &H2D : Object "FBSL_EXECUTESCRIPTBUFFER
User avatar
Goldsmith
FBSL tiny seed
FBSL tiny seed
 
Posts: 48
Joined: Fri Aug 19, 2016 10:21 am

Re: Examples broken in v3.5

Unread postby Mike Lobanovsky » Sun Sep 04, 2016 1:40 pm

Vinod:

This isn't the expected format of a message in this topic.

Please do not comment on what your Eclecta says about formatting. It does its job perfectly, but it can't yet sense multiline comments in between /* and */ and multiline string literals in between " and " if they span across several lines in your code editor. FBSL supports both of them but your Eclecta's formatter can't yet track them property and still tries to format what's there in the lines that fall in between the opening /* or " and a matching closing */ or " a few lines below. That's a known false-positive issue that's described in your Eclecta help file.

Further, you aren't supposed to mechanically delete all #DllDeclare's you're seeing, but only those of them that would read #DllDeclare Kernel32(bla, bla, bla, ...), or #DllDeclare User32(bla, bla, bla, ...), or #DllDeclare Gdi32(bla, bla, bla, ...). Instead, you've attempted to delete a valid directive that refers to a library which isn't among the three ones I pointed out: #DllDeclare Zlib(bla, bla, bla, ...). That's not a proper thing to do; zlib.dll is a 3rd party compression library whose APIs must be declared explicitly.

Finally, when you are answering a message, do not use the Quick Reply button. Prefer to use the POSTREPLY button that would open up a full featured editor with a range of text formatting options. At the top of your editor, you will see the topic title Re: Examples broken in v3.5. Modify it e.g. as follows Re: Examples broken in v3.5: DllDeclare. Then we'll know what's in your message when we're looking through the list of topics' contents. When in the editor, among the text formatting buttons right above your message text you will see a button called Code. Click it and it will add a couple of code tags. You are supposed to copy to the clipboard the entire example preformatted in your Eclecta and paste it in between the opening [ code ] tag and the closing [ / code ] tag (without spaces which I added here to be able to let the tags be shown at all, otherwise my editor would interpret them literally and add code quotation as follows: )
Code: Select all
bla bla bla


I do not want to lose my time paging through the help file myself searching for the code you are referring to. I'd like to see it here in its entirety, preformatted for me to copy-paste it to my Eclecta, add a quick fix, and copy-paste it back to the Examples runnable in v3.5 topic.

P.S. Object 'MB_YESNO' isn't found is an indication that you have to add a #Include <Include\Windows.inc> directive. FBSL v3.5 has all of Windows constants collected in the Windows.inc include file and adds them selectively to your code when needed. v3.4 used its built-in library "@|Win32" for that purpose, but the library contained only a few of such constants but itself made the Fbsl.exe and Fbsl.dll binaries much fatter than they should've been. This is an "error" you're going to see very often when trying to run v3.4 examples in v3.5. At the same time, do not add this directive mechanically to all the examples you check. It is a bad programming style to include files that aren't exactly necessary for your code. I wouldn't like to see any more of such ill-mannered bloat as #Uses "@|Win32" in every example throughout the FBSL BASIC documentation.


TIA
Mike
"Я старый солдат, мадам, и не знаю слов любви."
"I am an old soldier, ma'am, and I don't know the words of love."
"Je suis un vieux soldat, madame, et je ne connais pas les mots d'amour."
"Ich bin ein alter Soldat, gnädige Frau, und ich weiß nicht die Worte der Liebe."

__________________________________________________________________________________________________________________________________________________
(3.2GHz i5 Core Quad, 8GB RAM / 2 x nVidia GTX 550Ti SLI-bridged, 2GB VRAM)
(x86 Win XP Pro Russian Sp3/x86 Win Vista Ultimate Sp2/x64 Win 7 Ultimate Sp1/Wine in x64 elementaryOS Luna)
User avatar
Mike Lobanovsky
FBSL Administrator
FBSL Administrator
 
Posts: 1824
Joined: Tue Apr 19, 2005 8:22 am
Location: Republic of Belarus

Re: Examples broken in v3.5

Unread postby Goldsmith » Sun Sep 04, 2016 1:54 pm

I will check them once again as per your corrections. :)
User avatar
Goldsmith
FBSL tiny seed
FBSL tiny seed
 
Posts: 48
Joined: Fri Aug 19, 2016 10:21 am

Re: Examples broken in v3.5

Unread postby Mike Lobanovsky » Sun Sep 04, 2016 2:15 pm

Thank you ever so much!!! :D
Mike
"Я старый солдат, мадам, и не знаю слов любви."
"I am an old soldier, ma'am, and I don't know the words of love."
"Je suis un vieux soldat, madame, et je ne connais pas les mots d'amour."
"Ich bin ein alter Soldat, gnädige Frau, und ich weiß nicht die Worte der Liebe."

__________________________________________________________________________________________________________________________________________________
(3.2GHz i5 Core Quad, 8GB RAM / 2 x nVidia GTX 550Ti SLI-bridged, 2GB VRAM)
(x86 Win XP Pro Russian Sp3/x86 Win Vista Ultimate Sp2/x64 Win 7 Ultimate Sp1/Wine in x64 elementaryOS Luna)
User avatar
Mike Lobanovsky
FBSL Administrator
FBSL Administrator
 
Posts: 1824
Joined: Tue Apr 19, 2005 8:22 am
Location: Republic of Belarus


Return to FBSL v3 Documentation

Who is online

Users browsing this forum: No registered users and 1 guest

cron