Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clarion > Re: pass group ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 9079 of 9117
Post > Topic >>

Re: pass group as parm (actually wanting to pass record)

by "Brad Kunkel" <bkunkel@[EMAIL PROTECTED] > Apr 4, 2008 at 10:50 AM

I believe the following will work as long as the file Wrktxt is defined in 
the dictionary or globally.
In the parent procedure:

map
   builddetailrecord procedure(*Wtxt:Record),string
end

passRec    GROUP(Wtxt:Record)
rtnString    STRING(1000)

CODE
  passRec = Wtxt:Record
  rtnString = builddetailrecord(passRec)
  ...

HTH,
Brad Kunkel
Integrated Business, Inc.


"Stanguru" <stanguru@[EMAIL PROTECTED]
> wrote in message 
news:8e1b6955-8826-4c1d-a8db-1363b54d70ac@[EMAIL PROTECTED]
> trying to make a CSV string out of a record
> yeah i know there are templates and such, but i need to do it myself
> going cross-eyed searching and using help, and have tried every which
> way
> i dont t-totally understand how to references
>
> map
> builddetailrecord procedure(*group),string
> end
>
> Wrktxt
> FILE,DRIVER('ASCII'),PRE(Wtxt),CREATE,BINDABLE,THREAD
> Record                record
> BigField                 string(2000)
>                     end
>                    END
>
>
> ....
>    Set(wrkfile)
>    Loop
>        Next(wrkfile)
>        If Errorcode() Then Break.
>        stop(wrkc:record)
>        wtxt:bigfield = BuildDetailRecord(wrkc:record)
>        ADD(Wrktxt)
>    end !end loop
>
> ...
> BuildDetailRecord   procedure(*group inrec)
>
> Outstring    cstring(2000)
> InRecord   &inrec
>
>
>    code
>    clear(Outstring)
>    stop('here in BDR - ' & InRecord{prop:fields})
>    Loop i# = 1 To InRecord{prop:fields}
>      case InRecord{PROP:Type, i#}
>      of  'STRING'
>         OutString = Clip(OutString) & '"' & clip(What(InRecord, i#))
> & '",'
>      of  'DATE'
>         OutString = Clip(OutString) & '"' &
> clip(format(What(InRecord, i#),@[EMAIL PROTECTED]
)) & '",'
>      Else
>         OutString = Clip(OutString) & clip(What(Inrecord, i#)) & ','
>      End
>    End
>    return(OutString)
 




 4 Posts in Topic:
pass group as parm (actually wanting to pass record)
Stanguru <stanguru@[EM  2008-04-03 13:13:21 
Re: pass group as parm (actually wanting to pass record)
pblais@[EMAIL PROTECTED]   2008-04-03 21:44:20 
Re: pass group as parm (actually wanting to pass record)
Stanguru <stanguru@[EM  2008-04-04 05:34:26 
Re: pass group as parm (actually wanting to pass record)
"Brad Kunkel" &  2008-04-04 10:50:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 1:46:12 CDT 2008.