You are here: PSPad forum > Bug report / Hlášení chyb > Re: PSPad doesn't like sub names with dash

Re: PSPad doesn't like sub names with dash

#1 PSPad doesn't like sub names with dash

Posted by: therium | Date: 2014-07-14 15:36 | IP: IP Logged

PSPad 4.5.8 2482 on Win 7

I have a subroutine name with a dash in it like this: sub do-something. But when I changed the subroutine names to contain a dash, then saved the file, the Code Explorer window updated with only "do" as the subroutine name. Currently, PSPad ignores the dash and anything after it.

Underline should also be allowed in the subroutine also.

Options: Reply | Quote | Up ^


#2 Re: PSPad doesn't like sub names with dash

Posted by: pspad | Date: 2014-07-14 15:43 | IP: IP Logged

Hello. Can you please tell me syntax where is this problem? I am sorry, but I my personal visionary is on his vacation winking smiley

Options: Reply | Quote | Up ^


#3 Re: PSPad doesn't like sub names with dash

Posted by: therium | Date: 2014-07-14 15:53 | IP: IP Logged

The perl subroutine characters allowed are here: oreilly.com. "The name of a subroutine is another Perl identifier (letters, digits, and underscores, but can't start with a digit) with a sometimes-optional ampersand (&) in front."

Test program:

#/usr/bin/perl
use warnings;
print "Hello\n";
exit; # Exit main

sub do_some2
{
my $i=1;
return;
}

sub whatsthisverylong_name
{
my $i=2;
return;
}

sub another3_test
{
my $i=3;
return;
}

Paste the test program into a new PSPad file. Save it. Look at code explorer window, SH-^-E.

Oh darn, dashes are not allowed. Underscores work. Please ignore my post.

Edited 4 time(s). Last edit at 2014-07-14 15:57 by therium.

Options: Reply | Quote | Up ^


#4 Re: PSPad doesn't like sub names with dash

Posted by: pspad | Date: 2014-07-14 16:59 | IP: IP Logged

PERL was the word I missed in your report. Thank you, fixed. Wait for the next build please.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR