Yogesh Chauhan's Blog

The ALPHA function in Envision Basic

in Envision Basic on January 1, 2022

The ALPHA function checks if a string is made of alphabetic characters entirely.

The ALPHA function is helpful to check if any string has characters other than alphabetic like special characters, escape sequences, the null value, etc.

Syntax


ALPHA(“str.expr”)

If a string is made entirely of alphabetic characters, the function returns 1.

If a string has numeric or other characters, the function returns 0.

If a string is empty or has a null value, the function returns 0.

The ALPHA function returns zero instead of converting the characters.

Examples

String contains a numeric character

ALPHA.RESULT will have value 0.


ALPHA.RESULT = ALPHA("AB2")

String contains only alphabetic characters

ALPHA.RESULT will have value 1.


ALPHA.RESULT = ALPHA("ABC")

An Empty String

ALPHA.RESULT will have value 0.


ALPHA.RESULT = ALPHA("")


Most Read

#1 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
What are Modules and Components in Angular?AngularJavaScript: Methods for HTML DOM classList PropertyJavaScriptData Flows in ReactReactSocial Media Colors: Sass VariablesMiscellaneousHow to create a Random Hex Color generator using JavaScript?JavaScriptColumn and Table Alias in PostgresPostgresCSS Attribute SelectorsCSSWindow setTimeout() Method in JavaScriptJavaScriptUseful (and probably ignored) HTML tags: Part 2HTMLHow to create a Star Ratings using CSS?CSSTackle Accessibility in React with JSXReactHow to use data-* Attributes in HTML?HTML