2 Replies - 1004 Views - Last Post: 07 June 2012 - 12:38 PM Rate Topic: -----

#1 beetlejuice  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 30-May 12

Little BBx guide !

Posted 07 June 2012 - 12:27 PM

Hi, i know BBx is an old language (1985) but i thought it would be nice to have a little guide because it's still use in some buisiness. I'll put what i know and feel free to add your own experience :)

Functions:
ABS() Function - Absolute Value
Syntax
ABS(num{,ERR=lineref})
Description
The ABS() function returns the absolute value of its numeric argument.
Parameter Description
num Numeric argument.
ERR=lineref Branch to be taken if an error occurs during execution.

Example
>PRINT ABS(123)
123
>PRINT ABS(0)
0
>PRINT ABS(-123)
123



CVS() Function - String Data Conversion
Syntax
CVS(string,int{,ERR=lineref})
Description

The CVS() function modifies a given string by the value of int from the table below:

Parameter Description

string String to be converted.

int Integer identifying conversion functions, according to the following table.

ERR=lineref Branch to be taken if an error occurs during execution.

Values for int Parameter

Value Description
0 Do nothing.

1 Strip leading spaces.

2 Strip trailing spaces.

4 Convert characters to uppercase.

8 Convert characters to lowercase.

16 Convert nonprintable characters to spaces.

32 Replace multiple spaces with a single space.

64 Replace "," and "." characters with values as specified in OPTS (see SETOPTS).


A combination of operations may be specified by adding functional values. For example, CVS(A$,5) strips leading spaces and converts to upper case. CVS(A$,5) is equivalent to CVS(A$,1+4), which is equivalent to CVS(CVS(A$,1),4). When multiple operations are combined in a single CVS() function, they are guaranteed to be applied in ascending numeric order. For example, CVS(A$,1+16+32) first strips leading spaces, then converts non-printable characters to spaces, and finally replaces multiple spaces with a single space. To apply multiple options in a different order, execute the CVS() in a nested manner as shown in the above example.

Examples

0010 LET A$=CVS(" 123",1)
0020 PRINT A$
123


Is This A Good Question/Topic? 0
  • +

Replies To: Little BBx guide !

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9572
  • View blog
  • Posts: 36,249
  • Joined: 12-June 08

Re: Little BBx guide !

Posted 07 June 2012 - 12:37 PM

Perhaps you should submit this into the 'other languages tutorial' section!
Was This Post Helpful? 0
  • +
  • -

#3 beetlejuice  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 30-May 12

Re: Little BBx guide !

Posted 07 June 2012 - 12:38 PM

Oops yeah sorry i didn't read to good title hehe
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1