Next: libsimmath Up: libsim Previous: libsimchario

# libsimswedish

```     NAME
libsimswedish	- utilities for	dealing	with Swedish national
characters

DESCRIPTION
The Swedish languages	uses three letters (AA,	AE, AO and aa,
ae, oe) that are not present in English. In 7-bit character
representations these	six charcters are replacing six
characters which thus	can not	be used. The following
routines are taking this convention into account and are
useful instead of their English couterparts (when dealing
with Swedish text). For simplictity they are named in
Swedish. Note	that these routines are	useful only when
Swedish characters in	7-bit representation is	used. For 8-
bit representations there is yet no widely used standard.

EXAMPLE
external Boolean procedure	Bokstav;
charcter C;
inimage;
C:-inchar;
if	Bokstav(C) then
...

AUTHOR
Various people at QZ and FOA,	Stockholm.

DETAILED INTERFACE
Bokstav
Boolean procedure Bokstav(C);
character C; ! Character to test ;
Returns True for 7-bit ISO-characters	correspondig to	Letter
and  in  additon  it	recognize  upper and lower case	of the
three	Swedish	national characters. These replace the	square
brackets  ([]), curley brackets ({}),	back-slash () and pipe
(|) in English ISO tabel.  These  six	 character  codes  are
thus considered letters by Bokstav.

LitenBokstav
text procedure LitenBokstav(T);
text T; ! text to convert,	Content	changed	but Pos
unchanged.;
Convert a string of characters to all	lower case as  LowCase
does.	 In  addition  it  also	 converts  the	three  Swedish
national characters, represented in 7	bit ASCII, ([] ->  {}|
resp.).

StorBokstav
text procedure StorBokstav(T);
text T; ! text to convert,	Content	changed	but Pos
unchanged.;

Convert a string of characters to all	upper case  as	UpCase
does.	 In  addition  it  also	 converts  the	three  Swedish
national characters, represented in 7	 bit  ASCII,  ({}|  ->
[] resp.).

JfrTkn
integer procedure JfrTkn (c1, c2);
character c1, c2; ! charcters to compare ;
Returns a three-way result (+1,0,-1) depending  on  how  the
two  characters  C1 and C2 compare. The result is calculated
taking the three Swedish characters into account  (using  7-
bit  ISO  representation).  JfrTkn considers upper and lower
case equal.  The result is defined as:       -1 if C1<C2
0 if C1=C2
+1 if C1>C2
JfrTkn is supposed  to  be  useful  when  sorting  (Swedish)
characters in	alfabetical order.

Meny
Boolean procedure Meny(T,I,Tabell,N);
name I; integer I;	! Result index when found ;
text T;		! String to look for ;
text array	Tabell;	! Table	of valid menu commands ;
integer N;		! Length of the	array Tabell (1:N) ;
This is a  Swedish  version  of  Menu,  considering  Swedish
national  characters.	 Meny  is  designed  to	 be  used  for
validity checks  in  menu-like  command  requests.  When  it
returns  true,  I  is	 returning  the	 index in Tabell which
matches the key T.  For more details see Meny.

TagOrd
text procedure TagOrd(T);
name T;  text T; !	Pos is used and	updated. Result	is
sub-text of T;
This is a Swedish version of GetItem.	The difference is that
it  allows  also Swedish national characters (represented in
7-bit	ISO) in	an 'identifier'.  Otherwise  see  GetItem  for
details

InOrd
text procedure InOrd(FileRef);
ref(File) FileRef;	! ref to open Infile (or Directfile)
object. ;
This is a Swedish version of	InItem,	 using	TagOrd	rather
than GetItem.	 InOrd skips spaces and	tabs, possibly calling
inimage to locate and	return	an  Item  (identifer,  number,
special  character).	See TagOrd and InItem respectively for
details.

```