Bob

Here's one I had lying around. Hack it as you will :)

Regards,

Brian

--------> CUT HERE <-------

      SUBROUTINE stdValue( FileName, FieldName, Id, Record, Value )
*--------------------------------------------------------------------------
*  Name        : stdValue
*  Description : Get a field value from the dictionary
*  Author      : Brian Leach
*  Project     : STD
*  Module      : GENERAL
*--------------------------------------------------------------------------
      Value = ""
      Open "DICT", FileName To DFL Else
         RETURN
      End
      Read DictRec From DFL, FieldName Else
         RETURN
      End

      @Id = Id
      @Record = Record
      @Dict = FileName

      First = UpCase(TrimF(DictRec))[1,1]
      Begin Case
         Case First = "D"
            Value = (Id:@fm:Record)<DictRec<2>+1>
            Conv = DictRec<3>
         Case First = "I"
            Value = IType(DictRec)
            Conv = DictRec<3>
         Case First = "A" Or First = "S"
            Value = (Id:@fm:Record)<DictRec<2>+1>
            If DictRec<8> <> "" Then
               Value = OConv(Value, DictRec<8>)
            End
            Conv = DictRec<7>
         Case 1
            Return
      End Case

      If Conv <> "" Then
         Value = OConvS(Value,Conv)
      End

      RETURN 
<---- End cut  ---->
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to