April 16, 2024, 02:07:26 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


SCHAR in Paragraph 6.277 of the User's Manual

Started by Logman, August 23, 2015, 06:59:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Logman

August 23, 2015, 06:59:34 AM Last Edit: August 23, 2015, 07:12:09 AM by Logman
PROBLEM - Explanation is not correct.

Click on the HELP menu and then select IWBasic User's Guide.

In the User's Guide go to SEARCH and enter "SCHAR".

Double click on "SCHAR" in the Select Topic window. It will bring up the SCHAR Topic as follows:

=============================================================
SCHAR

Syntax
schar = SCHAR(exp)

Description
Converts a value to a single signed char.

Parameters
exp - A numeric or string expression

Return value
A single signed character or value

Remarks

Example usage

print SCHAR("testing")


SUGGESTION 1:
Parameters
exp - A numeric or string expression

should be changed to:
Parameters
exp - A numeric value in the range -128 to 127

This is because SCHAR will only accept numeric values and not string expressions as shown in the code example.

SUGGESTION 2:

print SCHAR["testing")


should be changed to:

schar i = SCHAR(50)
print i


This is because the code example does not work since SCHAR does not accept string expressions. In fact, you get an error message to that effect when you try running the code as it is shown right now.

What is really happening is that SCHAR(50), for example, returns an ASCII representation of the value 50, which is the ASCII character 2.

So, the following will give a new line when printed:

PRINT SCHAR(10)

Ten (10) is the ASCII representation of a line feed.

Logman

Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

LarryMc

thanks for the find

correction will be in the next update
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library