Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Just go home

Just go home

Scheduled Pinned Locked Moved The Weird and The Wonderful
tutorial
12 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    loctrice
    wrote on last edited by
    #1

    I don't know what to say so : pfft....

    Rtn = ""

    Rtn = Rtn & " Some text " & vbCrLf

    ... repeat that many times ...

    Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

    MainInfo = WrapContent(Content)

    Function WrapContent(connection,content)
    Rtn = ""
    Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

    if Content > "" then
    	Rtn = Rtn & "" & vbCrLf
    	Rtn = Rtn & Content
    	xRtn = Rtn 'yeah, that's an xRtn that is never used.
    	Rtn = HtmlReFormat(xRtn & vbCrLf)
    end if
    
    WrapContent = Rtn
    

    End Function

    'This may be my favorite part.
    Function HtmlReFormat(Content)
    Content = Replace(Content,vbCRLF,"
    ") 'see what we do here. awesome!
    Content = Replace(Content," ","  ") 'yeah, not with the ;
    End Function

    'the way his iif is actually used in the code is horrible
    ' and supports messy logic:
    '''' example iif ''''

    Variable = trim(rs("some value"))
    Variable = iif(Variable,"=","value","Something",Variable)
    Variable = iif(Variable,"=","other value","Something",Variable)
    Variable = iif(Variable,"=","yet another value","Something",Variable)
    ... a few more times ...
    Variable = iif(Variable,"=","","Undefined",Variable)

    'and yes, it sets it back to itself on false every time
    ''''''''''''''''''''''

    Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

    dim Rtn
    
    Equal = trim(Equal)
    
    
    select case Equal
    
    
    
    	case "="
    
    		if sVal1 = sVal2 then 
    
            	    Rtn = IfTrue
    
    		Else
    
            	    Rtn = IfFalse
    
    		End If
    
    
    
    
    
    	case "<"
    
    		if sVal1 < sVal2 then 
    
            	    Rtn = IfTrue
    
    		Else
    
            	    Rtn = IfFalse
    
    		End If
    
    
    
    	case ">"
    
    		if sVal1 > sVal2 then 
    
            	    Rtn = IfTrue
    
    		Else
    
            	    Rtn = IfFalse
    
    		End If
    
    
    
    	case "<="
    
    		if sVal1 <= sVal2 then 
    
            	    Rtn = IfTrue
    
    		Else
    
            	    Rtn = IfFalse
    
    		End If
    
    
    	case ">="
    
    		if sVal1 >= sVal2 then 
    
            	    Rtn = IfTrue
    
    		Else
    
            	    Rtn = IfFalse
    
    		End If
    
    end select
    
    
    IIF = Rtn
    

    End Function

    If it moves, compile it

    E B enhzflepE P B 6 Replies Last reply
    0
    • L loctrice

      I don't know what to say so : pfft....

      Rtn = ""

      Rtn = Rtn & " Some text " & vbCrLf

      ... repeat that many times ...

      Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

      MainInfo = WrapContent(Content)

      Function WrapContent(connection,content)
      Rtn = ""
      Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

      if Content > "" then
      	Rtn = Rtn & "" & vbCrLf
      	Rtn = Rtn & Content
      	xRtn = Rtn 'yeah, that's an xRtn that is never used.
      	Rtn = HtmlReFormat(xRtn & vbCrLf)
      end if
      
      WrapContent = Rtn
      

      End Function

      'This may be my favorite part.
      Function HtmlReFormat(Content)
      Content = Replace(Content,vbCRLF,"
      ") 'see what we do here. awesome!
      Content = Replace(Content," ","  ") 'yeah, not with the ;
      End Function

      'the way his iif is actually used in the code is horrible
      ' and supports messy logic:
      '''' example iif ''''

      Variable = trim(rs("some value"))
      Variable = iif(Variable,"=","value","Something",Variable)
      Variable = iif(Variable,"=","other value","Something",Variable)
      Variable = iif(Variable,"=","yet another value","Something",Variable)
      ... a few more times ...
      Variable = iif(Variable,"=","","Undefined",Variable)

      'and yes, it sets it back to itself on false every time
      ''''''''''''''''''''''

      Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

      dim Rtn
      
      Equal = trim(Equal)
      
      
      select case Equal
      
      
      
      	case "="
      
      		if sVal1 = sVal2 then 
      
              	    Rtn = IfTrue
      
      		Else
      
              	    Rtn = IfFalse
      
      		End If
      
      
      
      
      
      	case "<"
      
      		if sVal1 < sVal2 then 
      
              	    Rtn = IfTrue
      
      		Else
      
              	    Rtn = IfFalse
      
      		End If
      
      
      
      	case ">"
      
      		if sVal1 > sVal2 then 
      
              	    Rtn = IfTrue
      
      		Else
      
              	    Rtn = IfFalse
      
      		End If
      
      
      
      	case "<="
      
      		if sVal1 <= sVal2 then 
      
              	    Rtn = IfTrue
      
      		Else
      
              	    Rtn = IfFalse
      
      		End If
      
      
      	case ">="
      
      		if sVal1 >= sVal2 then 
      
              	    Rtn = IfTrue
      
      		Else
      
              	    Rtn = IfFalse
      
      		End If
      
      end select
      
      
      IIF = Rtn
      

      End Function

      If it moves, compile it

      E Offline
      E Offline
      ekolis
      wrote on last edited by
      #2

      Wow... You should stick an Option Explicit in there and wait for the guy to come complaining about a bunch of compile errors that weren't there yesterday... ;P And I love how he defines his own "enhanced" version of IIf...

      1 Reply Last reply
      0
      • L loctrice

        I don't know what to say so : pfft....

        Rtn = ""

        Rtn = Rtn & " Some text " & vbCrLf

        ... repeat that many times ...

        Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

        MainInfo = WrapContent(Content)

        Function WrapContent(connection,content)
        Rtn = ""
        Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

        if Content > "" then
        	Rtn = Rtn & "" & vbCrLf
        	Rtn = Rtn & Content
        	xRtn = Rtn 'yeah, that's an xRtn that is never used.
        	Rtn = HtmlReFormat(xRtn & vbCrLf)
        end if
        
        WrapContent = Rtn
        

        End Function

        'This may be my favorite part.
        Function HtmlReFormat(Content)
        Content = Replace(Content,vbCRLF,"
        ") 'see what we do here. awesome!
        Content = Replace(Content," ","  ") 'yeah, not with the ;
        End Function

        'the way his iif is actually used in the code is horrible
        ' and supports messy logic:
        '''' example iif ''''

        Variable = trim(rs("some value"))
        Variable = iif(Variable,"=","value","Something",Variable)
        Variable = iif(Variable,"=","other value","Something",Variable)
        Variable = iif(Variable,"=","yet another value","Something",Variable)
        ... a few more times ...
        Variable = iif(Variable,"=","","Undefined",Variable)

        'and yes, it sets it back to itself on false every time
        ''''''''''''''''''''''

        Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

        dim Rtn
        
        Equal = trim(Equal)
        
        
        select case Equal
        
        
        
        	case "="
        
        		if sVal1 = sVal2 then 
        
                	    Rtn = IfTrue
        
        		Else
        
                	    Rtn = IfFalse
        
        		End If
        
        
        
        
        
        	case "<"
        
        		if sVal1 < sVal2 then 
        
                	    Rtn = IfTrue
        
        		Else
        
                	    Rtn = IfFalse
        
        		End If
        
        
        
        	case ">"
        
        		if sVal1 > sVal2 then 
        
                	    Rtn = IfTrue
        
        		Else
        
                	    Rtn = IfFalse
        
        		End If
        
        
        
        	case "<="
        
        		if sVal1 <= sVal2 then 
        
                	    Rtn = IfTrue
        
        		Else
        
                	    Rtn = IfFalse
        
        		End If
        
        
        	case ">="
        
        		if sVal1 >= sVal2 then 
        
                	    Rtn = IfTrue
        
        		Else
        
                	    Rtn = IfFalse
        
        		End If
        
        end select
        
        
        IIF = Rtn
        

        End Function

        If it moves, compile it

        B Offline
        B Offline
        BobJanova
        wrote on last edited by
        #3

        Have a 5 for the sheer level of :doh: involved in this.

        L 1 Reply Last reply
        0
        • B BobJanova

          Have a 5 for the sheer level of :doh: involved in this.

          L Offline
          L Offline
          loctrice
          wrote on last edited by
          #4

          I usually don't post his code on here. There are mountains of stuff in everything he touches. My first job when I got here was to learn a couple of things he was in charge of so that SOMEONE in the company would understand what the heck is going on with them. Everything that involves him that I have to do gives me a headache. It takes me longer to read and understand what is going on with his code than it would for me to write it again from scratch. Funny thing is, it takes him just as long to explain his code as it would me. It's faster to read it yourself than to ask him a question about it because he has to go through the same process (re-reading, trying to figure out what the heck is going on) as I do. Really, I can't even convey what type of coding he does.

          If it moves, compile it

          C 1 Reply Last reply
          0
          • L loctrice

            I usually don't post his code on here. There are mountains of stuff in everything he touches. My first job when I got here was to learn a couple of things he was in charge of so that SOMEONE in the company would understand what the heck is going on with them. Everything that involves him that I have to do gives me a headache. It takes me longer to read and understand what is going on with his code than it would for me to write it again from scratch. Funny thing is, it takes him just as long to explain his code as it would me. It's faster to read it yourself than to ask him a question about it because he has to go through the same process (re-reading, trying to figure out what the heck is going on) as I do. Really, I can't even convey what type of coding he does.

            If it moves, compile it

            C Offline
            C Offline
            Chris Meech
            wrote on last edited by
            #5

            loctrice wrote:

            Really, I can't even convey what type of coding he does.

            The term "Cowboy Coding" comes to my mind. ('cause the coder rides roughshod all over the code) :)

            Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

            L 1 Reply Last reply
            0
            • L loctrice

              I don't know what to say so : pfft....

              Rtn = ""

              Rtn = Rtn & " Some text " & vbCrLf

              ... repeat that many times ...

              Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

              MainInfo = WrapContent(Content)

              Function WrapContent(connection,content)
              Rtn = ""
              Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

              if Content > "" then
              	Rtn = Rtn & "" & vbCrLf
              	Rtn = Rtn & Content
              	xRtn = Rtn 'yeah, that's an xRtn that is never used.
              	Rtn = HtmlReFormat(xRtn & vbCrLf)
              end if
              
              WrapContent = Rtn
              

              End Function

              'This may be my favorite part.
              Function HtmlReFormat(Content)
              Content = Replace(Content,vbCRLF,"
              ") 'see what we do here. awesome!
              Content = Replace(Content," ","  ") 'yeah, not with the ;
              End Function

              'the way his iif is actually used in the code is horrible
              ' and supports messy logic:
              '''' example iif ''''

              Variable = trim(rs("some value"))
              Variable = iif(Variable,"=","value","Something",Variable)
              Variable = iif(Variable,"=","other value","Something",Variable)
              Variable = iif(Variable,"=","yet another value","Something",Variable)
              ... a few more times ...
              Variable = iif(Variable,"=","","Undefined",Variable)

              'and yes, it sets it back to itself on false every time
              ''''''''''''''''''''''

              Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

              dim Rtn
              
              Equal = trim(Equal)
              
              
              select case Equal
              
              
              
              	case "="
              
              		if sVal1 = sVal2 then 
              
                      	    Rtn = IfTrue
              
              		Else
              
                      	    Rtn = IfFalse
              
              		End If
              
              
              
              
              
              	case "<"
              
              		if sVal1 < sVal2 then 
              
                      	    Rtn = IfTrue
              
              		Else
              
                      	    Rtn = IfFalse
              
              		End If
              
              
              
              	case ">"
              
              		if sVal1 > sVal2 then 
              
                      	    Rtn = IfTrue
              
              		Else
              
                      	    Rtn = IfFalse
              
              		End If
              
              
              
              	case "<="
              
              		if sVal1 <= sVal2 then 
              
                      	    Rtn = IfTrue
              
              		Else
              
                      	    Rtn = IfFalse
              
              		End If
              
              
              	case ">="
              
              		if sVal1 >= sVal2 then 
              
                      	    Rtn = IfTrue
              
              		Else
              
                      	    Rtn = IfFalse
              
              		End If
              
              end select
              
              
              IIF = Rtn
              

              End Function

              If it moves, compile it

              enhzflepE Offline
              enhzflepE Offline
              enhzflep
              wrote on last edited by
              #6

              Think I got as far as & vbCrLf before I knew it was going to be some fun. Thanks! It certainly didn't disappoint.

              1 Reply Last reply
              0
              • C Chris Meech

                loctrice wrote:

                Really, I can't even convey what type of coding he does.

                The term "Cowboy Coding" comes to my mind. ('cause the coder rides roughshod all over the code) :)

                Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                L Offline
                L Offline
                loctrice
                wrote on last edited by
                #7

                I say he's not a programmer , he's a script kiddie. He can make a computer do something given enough time, but has no place in professional code.

                If it moves, compile it

                1 Reply Last reply
                0
                • L loctrice

                  I don't know what to say so : pfft....

                  Rtn = ""

                  Rtn = Rtn & " Some text " & vbCrLf

                  ... repeat that many times ...

                  Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

                  MainInfo = WrapContent(Content)

                  Function WrapContent(connection,content)
                  Rtn = ""
                  Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

                  if Content > "" then
                  	Rtn = Rtn & "" & vbCrLf
                  	Rtn = Rtn & Content
                  	xRtn = Rtn 'yeah, that's an xRtn that is never used.
                  	Rtn = HtmlReFormat(xRtn & vbCrLf)
                  end if
                  
                  WrapContent = Rtn
                  

                  End Function

                  'This may be my favorite part.
                  Function HtmlReFormat(Content)
                  Content = Replace(Content,vbCRLF,"
                  ") 'see what we do here. awesome!
                  Content = Replace(Content," ","  ") 'yeah, not with the ;
                  End Function

                  'the way his iif is actually used in the code is horrible
                  ' and supports messy logic:
                  '''' example iif ''''

                  Variable = trim(rs("some value"))
                  Variable = iif(Variable,"=","value","Something",Variable)
                  Variable = iif(Variable,"=","other value","Something",Variable)
                  Variable = iif(Variable,"=","yet another value","Something",Variable)
                  ... a few more times ...
                  Variable = iif(Variable,"=","","Undefined",Variable)

                  'and yes, it sets it back to itself on false every time
                  ''''''''''''''''''''''

                  Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

                  dim Rtn
                  
                  Equal = trim(Equal)
                  
                  
                  select case Equal
                  
                  
                  
                  	case "="
                  
                  		if sVal1 = sVal2 then 
                  
                          	    Rtn = IfTrue
                  
                  		Else
                  
                          	    Rtn = IfFalse
                  
                  		End If
                  
                  
                  
                  
                  
                  	case "<"
                  
                  		if sVal1 < sVal2 then 
                  
                          	    Rtn = IfTrue
                  
                  		Else
                  
                          	    Rtn = IfFalse
                  
                  		End If
                  
                  
                  
                  	case ">"
                  
                  		if sVal1 > sVal2 then 
                  
                          	    Rtn = IfTrue
                  
                  		Else
                  
                          	    Rtn = IfFalse
                  
                  		End If
                  
                  
                  
                  	case "<="
                  
                  		if sVal1 <= sVal2 then 
                  
                          	    Rtn = IfTrue
                  
                  		Else
                  
                          	    Rtn = IfFalse
                  
                  		End If
                  
                  
                  	case ">="
                  
                  		if sVal1 >= sVal2 then 
                  
                          	    Rtn = IfTrue
                  
                  		Else
                  
                          	    Rtn = IfFalse
                  
                  		End If
                  
                  end select
                  
                  
                  IIF = Rtn
                  

                  End Function

                  If it moves, compile it

                  P Offline
                  P Offline
                  Paul Conrad
                  wrote on last edited by
                  #8

                  loctrice wrote:

                  I don't know what to say

                  I second that. Well... I know what to say, but there's too much and 99.999% of it is not really kid sister safe to say :-\

                  "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

                  1 Reply Last reply
                  0
                  • L loctrice

                    I don't know what to say so : pfft....

                    Rtn = ""

                    Rtn = Rtn & " Some text " & vbCrLf

                    ... repeat that many times ...

                    Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

                    MainInfo = WrapContent(Content)

                    Function WrapContent(connection,content)
                    Rtn = ""
                    Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

                    if Content > "" then
                    	Rtn = Rtn & "" & vbCrLf
                    	Rtn = Rtn & Content
                    	xRtn = Rtn 'yeah, that's an xRtn that is never used.
                    	Rtn = HtmlReFormat(xRtn & vbCrLf)
                    end if
                    
                    WrapContent = Rtn
                    

                    End Function

                    'This may be my favorite part.
                    Function HtmlReFormat(Content)
                    Content = Replace(Content,vbCRLF,"
                    ") 'see what we do here. awesome!
                    Content = Replace(Content," ","  ") 'yeah, not with the ;
                    End Function

                    'the way his iif is actually used in the code is horrible
                    ' and supports messy logic:
                    '''' example iif ''''

                    Variable = trim(rs("some value"))
                    Variable = iif(Variable,"=","value","Something",Variable)
                    Variable = iif(Variable,"=","other value","Something",Variable)
                    Variable = iif(Variable,"=","yet another value","Something",Variable)
                    ... a few more times ...
                    Variable = iif(Variable,"=","","Undefined",Variable)

                    'and yes, it sets it back to itself on false every time
                    ''''''''''''''''''''''

                    Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

                    dim Rtn
                    
                    Equal = trim(Equal)
                    
                    
                    select case Equal
                    
                    
                    
                    	case "="
                    
                    		if sVal1 = sVal2 then 
                    
                            	    Rtn = IfTrue
                    
                    		Else
                    
                            	    Rtn = IfFalse
                    
                    		End If
                    
                    
                    
                    
                    
                    	case "<"
                    
                    		if sVal1 < sVal2 then 
                    
                            	    Rtn = IfTrue
                    
                    		Else
                    
                            	    Rtn = IfFalse
                    
                    		End If
                    
                    
                    
                    	case ">"
                    
                    		if sVal1 > sVal2 then 
                    
                            	    Rtn = IfTrue
                    
                    		Else
                    
                            	    Rtn = IfFalse
                    
                    		End If
                    
                    
                    
                    	case "<="
                    
                    		if sVal1 <= sVal2 then 
                    
                            	    Rtn = IfTrue
                    
                    		Else
                    
                            	    Rtn = IfFalse
                    
                    		End If
                    
                    
                    	case ">="
                    
                    		if sVal1 >= sVal2 then 
                    
                            	    Rtn = IfTrue
                    
                    		Else
                    
                            	    Rtn = IfFalse
                    
                    		End If
                    
                    end select
                    
                    
                    IIF = Rtn
                    

                    End Function

                    If it moves, compile it

                    B Offline
                    B Offline
                    BillW33
                    wrote on last edited by
                    #9

                    Wow, that is some of the worst garbage code I have seen and I have seen a lot of poor code. X|

                    Just because the code works, it doesn't mean that it is good code.

                    L 1 Reply Last reply
                    0
                    • B BillW33

                      Wow, that is some of the worst garbage code I have seen and I have seen a lot of poor code. X|

                      Just because the code works, it doesn't mean that it is good code.

                      L Offline
                      L Offline
                      loctrice
                      wrote on last edited by
                      #10

                      Trust me , this is nothing compared to his regular coding. Just a little window from what is, for him, a clean file. I just had enough of dealing with it this time and decided to post.

                      If it moves, compile it

                      B 1 Reply Last reply
                      0
                      • L loctrice

                        I don't know what to say so : pfft....

                        Rtn = ""

                        Rtn = Rtn & " Some text " & vbCrLf

                        ... repeat that many times ...

                        Content = Rtn 'yeah, that just happened. No, Content wasn't used prior to this

                        MainInfo = WrapContent(Content)

                        Function WrapContent(connection,content)
                        Rtn = ""
                        Rtn = Rtn & ... logic for gathering more information (all in h4 tags) with vbCrLf ..

                        if Content > "" then
                        	Rtn = Rtn & "" & vbCrLf
                        	Rtn = Rtn & Content
                        	xRtn = Rtn 'yeah, that's an xRtn that is never used.
                        	Rtn = HtmlReFormat(xRtn & vbCrLf)
                        end if
                        
                        WrapContent = Rtn
                        

                        End Function

                        'This may be my favorite part.
                        Function HtmlReFormat(Content)
                        Content = Replace(Content,vbCRLF,"
                        ") 'see what we do here. awesome!
                        Content = Replace(Content," ","  ") 'yeah, not with the ;
                        End Function

                        'the way his iif is actually used in the code is horrible
                        ' and supports messy logic:
                        '''' example iif ''''

                        Variable = trim(rs("some value"))
                        Variable = iif(Variable,"=","value","Something",Variable)
                        Variable = iif(Variable,"=","other value","Something",Variable)
                        Variable = iif(Variable,"=","yet another value","Something",Variable)
                        ... a few more times ...
                        Variable = iif(Variable,"=","","Undefined",Variable)

                        'and yes, it sets it back to itself on false every time
                        ''''''''''''''''''''''

                        Function IIF(sVal1, Equal, sVal2 , IfTrue, IfFalse)

                        dim Rtn
                        
                        Equal = trim(Equal)
                        
                        
                        select case Equal
                        
                        
                        
                        	case "="
                        
                        		if sVal1 = sVal2 then 
                        
                                	    Rtn = IfTrue
                        
                        		Else
                        
                                	    Rtn = IfFalse
                        
                        		End If
                        
                        
                        
                        
                        
                        	case "<"
                        
                        		if sVal1 < sVal2 then 
                        
                                	    Rtn = IfTrue
                        
                        		Else
                        
                                	    Rtn = IfFalse
                        
                        		End If
                        
                        
                        
                        	case ">"
                        
                        		if sVal1 > sVal2 then 
                        
                                	    Rtn = IfTrue
                        
                        		Else
                        
                                	    Rtn = IfFalse
                        
                        		End If
                        
                        
                        
                        	case "<="
                        
                        		if sVal1 <= sVal2 then 
                        
                                	    Rtn = IfTrue
                        
                        		Else
                        
                                	    Rtn = IfFalse
                        
                        		End If
                        
                        
                        	case ">="
                        
                        		if sVal1 >= sVal2 then 
                        
                                	    Rtn = IfTrue
                        
                        		Else
                        
                                	    Rtn = IfFalse
                        
                        		End If
                        
                        end select
                        
                        
                        IIF = Rtn
                        

                        End Function

                        If it moves, compile it

                        Sander RosselS Offline
                        Sander RosselS Offline
                        Sander Rossel
                        wrote on last edited by
                        #11

                        This guy must be brilliant if he can write that much code! :D What's best about code such as this is it is really easy to maintain. Need to store anything? Just use Rtn! Need a new variable? Name it Rtn! Need input? Rtn! Need output? Rtn! Rtn, your all-round coding solution, now coming to code near you!

                        It's an OO world.

                        public class Naerling : Lazy<Person>{
                        public void DoWork(){ throw new NotImplementedException(); }
                        }

                        1 Reply Last reply
                        0
                        • L loctrice

                          Trust me , this is nothing compared to his regular coding. Just a little window from what is, for him, a clean file. I just had enough of dealing with it this time and decided to post.

                          If it moves, compile it

                          B Offline
                          B Offline
                          BillW33
                          wrote on last edited by
                          #12

                          My sympathies to you for having to put up with that nonsense.

                          Just because the code works, it doesn't mean that it is good code.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups