• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Recent posts

#91
General Discussion / Re: Question About "ProgEx37 -...
Last post by James C. Fuller - August 09, 2019, 11:49:35 AM
I emailed Fred and here is his response:


For some reason I can't seem to log in to Jose's Forum.  I seem to recall this happening before.  In any case, I finally found the post up in the main section of Jose's board, and it looks to me like the pre-defined symbol by Microsoft is causing the fellow's program to run as a UNICODE build as opposed to an ansi build, and that's why he is confused.  You are certainly aware of that issue, aren't you?  The issue is that when using Visual Studio  all builds are UNICODE unless one goes into the 'General Properties' window of the project, where one finds a dropdown where one can select ansi, wide character etc.  It defaults to wide character.  Since you and I work from batch files or command line, we don't have to deal with that.  Perhaps if you can log in you might mention that to the fellow?  He's worried about it.
#92
General Discussion / Re: Question About "ProgEx37 -...
Last post by Paul Squires - August 09, 2019, 03:19:52 AM
Is len reporting the number of characters (13) and sizeof the actual size of the string being unicode so it's two bytes per character (26) plus two bytes for the trailing nul terminating character (28)?.
#93
General Discussion / Re: Question About "ProgEx37 -...
Last post by Seamus Decker - August 08, 2019, 06:14:22 PM
Well this is peculiar. The array itself is a 14 byte object, but for some reason the output says it is a 28 byte object. Comprehension of sorcery is behind this is above my pay grade I think, but this at least reconciles the inconsistency enough for me to let it go and carry on.

If anyone has a clarification for what is going on there, I appreciate it.
#94
General Discussion / Question About "ProgEx37 -- Wi...
Last post by Seamus Decker - August 08, 2019, 01:48:36 AM
I have a question about ProgEx37 -- Windows GUI Programming; Basic Template Program With Discussion. Did not see any questions or discussion in that thread, so I wasn't sure if it would be poor etiquette to post a question in that thread.

My question: When Frederick gets to the "tchar1.cpp" example, he states
QuoteIt gives precisely the same output as Ansi.cpp (1st little program above).

But for me, it doesn't. I've typed it in and copy-pasted it twice and I get:
//iLen             = 13
//sizeof(szBuffer) = 28

Not
//iLen             = 13
//sizeof(szBuffer) = 14

I have not yet fully digested that whole post, but this seemed like a non-trivial matter, i.e., "the generic functions and data types" are NOT reducing "simply to the ansi single byte char based functions."
#95
OxygenBasic / Re: web navigation O2
Last post by Eduardo Jorge - August 08, 2019, 01:41:22 AM
I want to build some simple programs but that has a certain requirement
so I thought of putting a link to the O2 page as an advertisement,
Is there a way to insert a link and open it through their default browser?
#96
OxygenBasic / Re: web navigation O2
Last post by Eduardo Jorge - August 07, 2019, 08:23:03 PM
James C. Fuller
Yes, it would be interesting and something less permissive


I noticed that the values are explicit in the generated code
I think it would be interesting to code to prevent others from exchanging these texts so easily
like a link, someone malicious could link to a malicious page very easily
I am trying to add the encrypted values and a function that will decrypt for use, of course I can only do this simply and inefficiently for those who know the subject
#97
OxygenBasic / Re: web navigation O2
Last post by James C. Fuller - July 28, 2019, 12:11:08 PM
Quote from: Eduardo Jorge on July 27, 2019, 03:35:07 PM
I wouldn't mind if O2 had only one method of declaring variables that would just force manually declaring without being able to paste ready-made codes
would even be good because it would make O2 independent of other languages and make it easier for Charles

Maybe a #SYNTAX=[O2] statement ??

James
#98
OxygenBasic / Re: web navigation O2
Last post by Eduardo Jorge - July 27, 2019, 03:35:07 PM
Yes I know,
as I said the possibility of so many methods is only useful for reusing lines of code without having to rewrite
but this feat has to be consistent, or at least show syntax error on the right line and not elsewhere
I wouldn't mind if O2 had only one method of declaring variables that would just force manually declaring without being able to paste ready-made codes
would even be good because it would make O2 independent of other languages and make it easier for Charles
#99
OxygenBasic / Re: web navigation O2
Last post by Zlatko Vid - July 25, 2019, 06:41:28 PM
The simpliest way to declare variables in 02 is
INT a,s,d,f,g,h
STRING q,w,e,r,t,z
FLOAT x,y,c,v,b

INT arr1[100] : STRING s[200] : FLOAT x[300]

as you can see there is no need to use DIM
#100
OxygenBasic / Re: web navigation O2
Last post by Eduardo Jorge - July 24, 2019, 03:34:36 PM
but what is the default of O2?
is the basic C standard?
As I said, O2's strongest point is its virtually free syntax, and it's also its weakest point.
In the case of "REDIM", note that it is accepted to declare variables with "DIM x AS LONG", not that I prefer to use this mode, but I hope that accepting a mode using dim is also suitable for REDIM, and the error appeared in another line. took longer to know where it was
I had commented before that I would prefer syntax blocks, to force the chosen syntax avoiding typos
to me, C's bad point is his "symbolism" {}; && ++! = ... I couldn't get used to it, I don't miss Gosub so much despite having certain uses,
but for me End if, Next .., is paramount to locate me in the logic of what I'm doing
Having so many ways to declare variables as I see it is only useful for reusing code, because writing something from scratch is the most important thing.