Hi:
In trying to execute a size change of the console, using the PowerBasic’s Console Compiler 4.0’s command,
CONSOLE SET SCREEN ncRows, ncColumns
I have been unable, for the vast majority of screen sizes, to affect a size change, regardless of how ncRows is set. Generally no change occurs at all. An example in which this is the case is the little program below, which I wrote to try to understand what is going on with the command in question:
#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN () AS LONG
DIM rows AS LONG, columns AS LONG, i AS LONG
FOR i = 25 TO 69
END FUNCTION
When I do run the above program, a typical result is for the number of rows to, in fact, decrease perhaps to 23, and remain fixed regardless of the value of i. Only intermittently does the screen actually change size so that the number of rows matches the index, i, and usually only for a specific value of i, reverting back to a much lower row and column size as i increments. In addition, when this does happen, it does so erratically, varying from run to run, with no modification at all on my part and with no discernable pattern. This is a typical output from the program after I went through the loop a few times:
42 = index 23 = rows 68 = columns
and what I saw is consistent with the output, i.e. the report produced by the command “CONSOLE GET SCREEN “does seem to be reporting results correctly—the console did appear to be of dimensions of about 23 rows and 68 columns. Notice also, that even the column has decremented to 68, even though it is held at 70 throughout the run. I do observe that the vertical scroll bar shrinks as I repeatedly hit return, indicating that the virtual console is increasing in size, though the visible console remains unchanged. The PowerBasic log file is normal, with no errors. Also, when I run this in the IDE, ERR = 0 throughout the run. The computer that produced this output is a Dell DM051 with a system memory of 3584 MB, a Phoenix BIOS, a RADEON X600 256MB HyperMemory video adapter, and it runs a Windows XP operating system, service pack 2. For whatever it’s worth, I have run this same code on a HP Pavilion laptop using the same operating system and the program behaved as it should.
Any assistance or workaround to this problem, other than using another machine, would be appreciated. The actual application I am working on that will invoke the CONSOLE SET command is expected to be run on various platforms, so I am anxious to resolve this issue.
Thank you,
Paul
In trying to execute a size change of the console, using the PowerBasic’s Console Compiler 4.0’s command,
CONSOLE SET SCREEN ncRows, ncColumns
I have been unable, for the vast majority of screen sizes, to affect a size change, regardless of how ncRows is set. Generally no change occurs at all. An example in which this is the case is the little program below, which I wrote to try to understand what is going on with the command in question:
#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN () AS LONG
DIM rows AS LONG, columns AS LONG, i AS LONG
FOR i = 25 TO 69
CONSOLE SET SCREEN i, 70 'ncRows&, ncColumns&
CONSOLE GET SCREEN TO rows, columns
PRINT i; " = index", rows; " = rows", columns; " = columns"
WAITKEY$
NEXT iCONSOLE GET SCREEN TO rows, columns
PRINT i; " = index", rows; " = rows", columns; " = columns"
WAITKEY$
END FUNCTION
When I do run the above program, a typical result is for the number of rows to, in fact, decrease perhaps to 23, and remain fixed regardless of the value of i. Only intermittently does the screen actually change size so that the number of rows matches the index, i, and usually only for a specific value of i, reverting back to a much lower row and column size as i increments. In addition, when this does happen, it does so erratically, varying from run to run, with no modification at all on my part and with no discernable pattern. This is a typical output from the program after I went through the loop a few times:
42 = index 23 = rows 68 = columns
and what I saw is consistent with the output, i.e. the report produced by the command “CONSOLE GET SCREEN “does seem to be reporting results correctly—the console did appear to be of dimensions of about 23 rows and 68 columns. Notice also, that even the column has decremented to 68, even though it is held at 70 throughout the run. I do observe that the vertical scroll bar shrinks as I repeatedly hit return, indicating that the virtual console is increasing in size, though the visible console remains unchanged. The PowerBasic log file is normal, with no errors. Also, when I run this in the IDE, ERR = 0 throughout the run. The computer that produced this output is a Dell DM051 with a system memory of 3584 MB, a Phoenix BIOS, a RADEON X600 256MB HyperMemory video adapter, and it runs a Windows XP operating system, service pack 2. For whatever it’s worth, I have run this same code on a HP Pavilion laptop using the same operating system and the program behaved as it should.
Any assistance or workaround to this problem, other than using another machine, would be appreciated. The actual application I am working on that will invoke the CONSOLE SET command is expected to be run on various platforms, so I am anxious to resolve this issue.
Thank you,
Paul
Comment