🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual.misc
Article #1

Re: vbScript

#1
From: Auric__
Date: Mon, 26 Jan 2026 20:55
23 lines
1759 bytes
Wendelin Uez wrote:

> This simple Script
>> Dim Filename, Pattern, OK
>> Filename = "xy.pdf"
>> Pattern = "*.pdf"
>> OK =  "11.pdf" Like "*.pdf"
> always returns "sub or function procedure not defined" for line 4
> but why?

I'm pretty sure VBscript doesn't have the "Like" operator. In this specific 
case, just check the extension:

  Dim Filename, Pattern, OK
  Filename = "xy.pdf"
  Pattern = ".pdf"
  OK = (Right(LCase(Filename), Len(Pattern)) = LCase(Pattern))

Note the "*" was removed from Pattern.

-- 
Look, it's everybody's favorite rich girl/goddess of discord,
Eris Hilton!
Technical Details
Message-ID: <XnsB3E08D9E78E7Cauricauricauricauric@157.180.91.226>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <10l61fo$m241$1@solani.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Auric__" <not.my.real@email.address>
Newsgroups: comp.lang.basic.visual.misc
Subject: Re: vbScript
Date: Mon, 26 Jan 2026 20:55:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <XnsB3E08D9E78E7Cauricauricauricauric@157.180.91.226>
References: <10l61fo$m241$1@solani.org>
Injection-Date: Mon, 26 Jan 2026 20:55:19 +0000 (UTC)
Injection-Info: dont-email.me; posting-host="4fde19104a68e5f7a116970b3554e190";
	logging-data="2982440"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+/k75d/sRZYf+UX2VtlrGl"
User-Agent: Xnews/2009.05.01
Cancel-Lock: sha1:VkPBtIHajI9V4SxMOn4Qt6tTncA=
X-Face: +,&^!i3LPqz7/qfxgF[JJqAP^>bTVLZ-zj})PmI{auZ']fwMM4mh`$]b0sacD4p@R[yU'Mf=.T}|aW6^#_lm6U|e|/#d:nfRn29,GBLvX=ygRH(?h.=KFfJ\INamt#H|)k@,x[ko$(d~iAo'<1XzB@%];