前往Shuct.Net首页

Shudepb PB反编译专家长时间以来,为业内同类软件事实上的唯一选择.细节,彰显专业.态度,决定品质.

关于PowerBuilder的搜索

SAP Sybase Forums - PowerBuilder - Powerscript - PB example for BlobMid() , BlobEdit() (Urgent) &times; Sybase NNTP forums - End Of Life (EOL) The NNTP forums from Sybase - forums.sybase.com - are now closed. All new questions should be directed to the appropriate forum at the SAP Community Network (SCN). Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center. Forums Archive > PowerBuilder > Powerscript > "PB example for BlobMid() , BlobEdit() (Urgent)" PB example for BlobMid() , BlobEdit() (Urgent) 13 posts in Powerscript . Last posting was on 2010-01-05 14:42:50.0Z Jenny Posted on 2009-12-01 12:50:40.0Z Sender: 4515.4b14f6bc.1804289383@sybase.comFrom: JennyNewsgroups: sybase.public.PowerBuilder.powerscriptSubject: PB example for BlobMid() , BlobEdit() (Urgent)X-Mailer: WebNews to Mail Gateway v1.1tMessage-ID: <4b151120.490b.1681692777@sybase.com>NNTP-Posting-Host: 10.22.241.41X-Original-NNTP-Posting-Host: 10.22.241.41Date: 1 Dec 2009 04:50:40 -0800X-Trace: forums-1-dub 1259671840 10.22.241.41 (1 Dec 2009 04:50:40 -0800)X-Original-Trace: 1 Dec 2009 04:50:40 -0800, 10.22.241.41Lines: 12Path: forums-1-dub!not-for-mailXref: forums-1-dub sybase.public.PowerBuilder.powerscript:27187 Article PK: 761754 Hi All, I am new to PowerBuilder. I am using PB 11, can anyone give me very small PB example which demonstrate BlobMid() , BlobEdit() ( not event) of PowerBuilder. Thanks Jenny Ivaylo Ivanov Posted on 2009-12-01 14:21:33.0Z From: &#034;Ivaylo Ivanov&#034; <n0_S_p_a_m_i.ivanov@isy-dc.com>Newsgroups: sybase.public.PowerBuilder.powerscriptReferences: <4b151120.490b.1681692777@sybase.com>Subject: Re: PB example for BlobMid() , BlobEdit() (Urgent)Lines: 60X-Priority: 3X-MSMail-Priority: NormalX-Newsreader: Microsoft Outlook Express 6.00.2900.5843X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579X-RFC2646: Format=Flowed; OriginalNNTP-Posting-Host: vip152.sybase.comX-Original-NNTP-Posting-Host: vip152.sybase.comMessage-ID: <4b15266d@forums-1-dub>Date: 1 Dec 2009 06:21:33 -0800X-Trace: forums-1-dub 1259677293 10.22.241.152 (1 Dec 2009 06:21:33 -0800)X-Original-Trace: 1 Dec 2009 06:21:33 -0800, vip152.sybase.comPath: forums-1-dub!not-for-mailXref: forums-1-dub sybase.public.PowerBuilder.powerscript:27188 Article PK: 793607 function f_hex_to_blob(string as_input) returns blob ================================== // Purpose: converts a hex string to a blob of the corresponding bytes // Arguments: string as_input - the string to be converted (with HEX digits!) // Returns: blob - the byte contents blob lblb_result string ls_hex = "0123456789ABCDEF", ls_temp long ll_index byte lbt_temp if mod(len(as_input), 2) = 1 then as_input = "0" + as_input end if // The working blob is created with 1 additional byte, // because when BlobEdit function is called for the last byte // of the blob, it returns NULL (position at which the next data // can be copied - not enough space) and doesn't perform // the operation for the last byte of the blob! lblb_result = Blob(space(len(as_input) / 2 + 1), EncodingANSI!) for ll_index = 1 to len(as_input) step 2 // Get next byte from the string ls_temp = Upper(mid(as_input, ll_index, 2)) lbt_temp = 16 * (pos(ls_hex, mid(ls_temp, 1, 1)) - 1) + pos(ls_hex, mid(ls_temp, 2, 1)) - 1 // Put the byte into the blob BlobEdit(lblb_result, (ll_index + 1)/ 2, lbt_temp) next lblb_result = BlobMid(lblb_result, 1, len(lblb_result) - 1) return lblb_result Is this enough? If not, have you looked at the examples in the help for these functions? Regards, Ivaylo <Jenny> wrote in message news:4b151120.490b.1681692777@sybase.com... > Hi All, > > I am new to PowerBuilder. > I am using PB 11, can anyone give me very small PB example > which demonstrate BlobMid() , BlobEdit() ( not event) of > PowerBuilder. > > > > > Thanks > Jenny 漏 Copyright Fri Feb 28 05:37:03 UTC 2014, SAP Inc. - Forums Archive v 2.2