ToolChain/bin/targets/m68k-amigaos/ndk/Tutorials/ARexx/FunctionLibrary/Source/dispatch.c
VOID
NumberToString(
	LONG					Value,
	STRPTR					String,
	struct RexxSampleBase *	RexxSampleBase)
{
	LONG Sign;
	LONG Next;
	LONG Len;
	LONG i;
	UBYTE c;

	if(Value < 0)
	{
		Sign = -1;
		Value = (-Value);
	}
	else
	{
		Sign = 1;
	}

	Len = 0;

	while(Value > 0 && Len < 15)
	{
		Next = SDivMod32(Value,10);

		String[Len++] = (Value - SMult32(Next,10)) + '0';

		Value = Next;
	}

	if(Sign < 0)
		String[Len++] = '-';

	String[Len] = 0;

	if(Len > 1)
	{
		for(i = 0 ; i < Len / 2 ; i++)
		{
			c						= String[i];
			String[i]				= String[Len - (i + 1)];
			String[Len - (i + 1)]	= c;
		}
	}
}
/* NumberToString(LONG Value,STRPTR String,struct RexxSampleBase *RexxSampleBase):
	 *
	 *	Convert a number into a string. This is done using the
	 *	utility.library integer math routines and thus looks a
	 *	bit bizarre...
	 */
NumberToString(LONG Value,STRPTR String,struct RexxSampleBase *RexxSampleBase):
Convert a number into a string. This is done using the
utility.library integer math routines and thus looks a
bit bizarre
NumberToString ( LONG Value STRPTR String struct RexxSampleBase * RexxSampleBase ) : Convert a number into a string . This is done using the utility . library integer math routines and thus looks a bit bizarre
VOID
NumberToString(
	LONG					Value,
	STRPTR					String,
	struct RexxSampleBase *	RexxSampleBase)
{
	LONG Sign;
	LONG Next;
	LONG Len;
	LONG i;
	UBYTE c;
	if(Value < 0)
	{
		Sign = -1;
		Value = (-Value);
	}
	else
	{
		Sign = 1;
	}
	Len = 0;
	while(Value > 0 && Len < 15)
	{
		Next = SDivMod32(Value,10);
		String[Len++] = (Value - SMult32(Next,10)) + '0';
		Value = Next;
	}
	if(Sign < 0)
		String[Len++] = '-';
	String[Len] = 0;
	if(Len > 1)
	{
		for(i = 0 ; i < Len / 2 ; i++)
		{
			c						= String[i];
			String[i]				= String[Len - (i + 1)];
			String[Len - (i + 1)]	= c;
		}
	}
}
VOID NumberToString ( LONG Value , STRPTR String , struct RexxSampleBase * RexxSampleBase ) { LONG Sign ; LONG Next ; LONG Len ; LONG i ; UBYTE c ; if ( Value < 0 ) { Sign = -1 ; Value = ( - Value ) ; } else { Sign = 1 ; } Len = 0 ; while ( Value > 0 && Len < 15 ) { Next = SDivMod32 ( Value , 10 ) ; String [ Len ++ ] = ( Value - SMult32 ( Next , 10 ) ) + ' ' ; Value = Next ; } if ( Sign < 0 ) String [ Len ++ ] = ' ' ; String [ Len ] = 0 ; if ( Len > 1 ) { for ( i = 0 ; i < Len / 2 ; i ++ ) { c = String [ i ] ; String [ i ] = String [ Len - ( i + 1 ) ] ; String [ Len - ( i + 1 ) ] = c ; } } }
NumberToString(LONG Value,STRPTR String,struct RexxSampleBase *RexxSampleBase):
      Convert a number into a string.
NumberToString ( LONG Value STRPTR String struct RexxSampleBase * RexxSampleBase ) : Convert a number into a string .